Try this handy tool to convert a Web site into a native app with Electron

The Electron framework lets you write cross-platform desktop applications using JavaScript, HTML and CSS. It is based on Node.js and Chromium and is used by the Atom editor and many other apps.

There is an handy tool to take advantage of Electron technology and make “native” apps from an URL, Nativefier:

npm install nativefier -g
nativefier "https://example.com"

(you just need npm package manager to install it)

It will make a folder in your Home with the executable in it:

how Nativefier works

This is how Google+ looks for example:

Google+Electron

Zero differences compared to Chrome/Chromium web app apparently, but the RAM used is much lower:

  • Google+ as Chromium web app: ~350 MB
  • Google+ as Electron app: ~100 MB

You also get a better integration with the desktop enviroment, for example clicking on a link open the default browser, not necessarily Chrome/Chromium, and native notifications:

Native notification with Electron

And my favorite feature, CSS and JavaScript injection: you can specify some CSS/JavaScript code to include before building the app with --inject.

For example I used some CSS rules to add a Breeze style to Diaspora*:

Diaspora* with Breeze style

I’m going to build more apps. Ciao!

Comments (Markdown supported):

  1. Pingback: Cómo crear tus propias aplicaciones web para el escritorio

  2. Pingback: Cómo crear tus propias aplicaciones web para el escritorio con Electron | SYSGURU

  3. Maxi Schimmel

    Excellent! Very useful

  4. rtfa

    What is the chance it would create a good native app for bugs.kde.org – i hate web apps.

  5. Very good, the only feature that I miss is the zoom.

  6. eyome

    Thank you for the tips, I tried on Movim and it works great!

  7. Bugworm

    Can you share your wallpaper?

    1. It’s the draft by Ken Vermette for Plasma 5.8 default wallpaper.

  8. Eugene

    How do I make my decoration follow the window color scheme? (like it is in your screenshot)

  9. Pingback: Links 28/8/2016: Q4OS 1.6, ConnochaetOS 14.2 | Techrights

  10. Pingback: I “defined” a file-type for web-apps and wrote the script to install them with Electron – Dissentio ergo sum

Leave a Reply