How to electron
Published in

How to electron

How to get the source code of any electron application

So there is a way to get the source code of a closed source electron app. Generally, all the electron apps are packed through asar and you can unpack the same using this module. For example, if you want to see the source code of the Slack app then you need to do the following things -

# Open terminal and install asar node module globally$ npm install -g asar# Go into the app’s directory, in our case it’s Slack$ cd /Applications/Slack.app/Contents/Resources# Create a directory to paste the content of app$ mkdir example-sourcecode# Unpack the app.asar file in the above directory using asar$ asar extract app.asar example-sourcecode # Boom cd into it and see the source code of the app

If you have enjoyed this article and would like to buy me a coffee ☕️ follow this 👇

Buy Akash Nimare a coffee

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store