Electron - When JS comes to Desktop Apps
1 min readWhen Node Webkit was released, it was a big thing. There was a massive hype for creating desktop apps using nw.js. But it had certain limitations and plus as per the blog post by the author itself, around WebKit library which lacked modern browser features and was hard to use on other platforms, other than Linux.
After a lot of effort by contributers and Github, Electron was released. Which added far more better features and extensive API support, and tons
of libraries & modules by the community. I would suggest to follow awesome-electron, as it packs some cool goodies and articles around cross platform app development.
If interested, check out electron based apps. Some of them will be rejected by your OS, because of certification issues but you can ignore them, as they are legit .
My personal favs are:
- Visual Studio Code
- FastLane app aka Uber
- Sqlectron Simple and lightweight SQL client desktop
- Playback
I have created 2 apps as well (Unofficial AppearIn desktop app & Countdown timer). They are working prototypes, just have to polish & publish it on Github (stay tuned!).
Today I will be discussing on how I organize and setup electron apps with features such as cross platform packaging & auto updater. The final structure looks something like this:
I am currently working on a boilerplate to setup a electronJS project with ReactJS & Webpack (with x64 packaging). Checkout the repo here and let me know your thoughts.
Contributions are always welcome .
Currently it supports:
- ReactJS (ES6)
- Packaging (x64, Mac & Win)
- SASS
Following is my TODO list on it:
- Auto Update (without Squirrel)
- Live reload using electron connect.
Let me know, what you guys think!
I will be posting updates here, whenever new changes are released.