Before you go any further it is important to know that this blog post is out of date. The technique used here has been integrated into the offical Electron project. Look here for more info.
Electron and the Mac App Store are 2 things that are difficult to pair, like fine wine and McDonalds. Chromium, the rendering engine for Electron, uses a whole host of private APIs. One might be tempted to use NW.js instead as it already has a build for the MAS, but that is impossible for many people. NW.js differentiates between files that can run Node.js code and files that can touch the DOM, which happens to break many libraries. If you don't want to patch the code yourself you can simply download my precompiled binary from here and then skip straight to the relevant section.
My patch for Electron is heavily based on the work done by Trevor Linton, Alexey Stoletny, and Johan Satgé who created an up to date patch for NW.js. I simply ported their code to Electron, removed a few extra private APIs, and put the patch into a branch of libchromiumcontent.