Awesome Open Source
Awesome Open Source

Electron-sample-app

Sample Electron app which includes tray, auto-launch, electron-packager for all the three OS-specific bundles( Windows, Linux, Mac )

Electron Packager

For Default OS-specific Bundle


	"build": "electron-packager . Electron-sample-app"

For Linux Bundle


    "build-linux32": "electron-packager . Electron-sample-app --platform=linux  --arch=ia32"

    "build-linux64": "electron-packager . Electron-sample-app --platform=linux  --arch=x64"

For windows Bundle


	"build-win32": "electron-packager . Electron-sample-app --platform=win32  --arch=ia32"

	"build-win64": "electron-packager . Electron-sample-app --platform=win32  --arch=x64"

For Mac Bundle


	"build-mac": "electron-packager . Electron-sample-app --platform=darwin  --arch=x64"
	

Run

Electron is an npm module that contains pre-compiled versions of Electron.

If you’ve installed it globally with npm, then you will only need to run the following in your app’s source directory:


	electron .

If you’ve installed it locally, then run:

macOS


	./node_modules/.bin/electron .
	or
	./Electron.app/Contents/MacOS/Electron your-app/

Linux


	./node_modules/.bin/electron .
	or
	./electron/electron your-app/

Windows


	.\node_modules\.bin\electron .
	or
	.\electron\electron.exe your-app\

Try this Sample


	# Clone the repository
	git clone [email protected]:linkRachit/Electron-sample-app.git

	# Go into the repository
	cd Electron-sample-app

	# Install dependencies
	npm install
	
	# Run the app
	npm start

Now you are able to see GUI of app, app icon in tray, and app service in platform services and every time system restart, app will be launch automatically.


Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Javascript (1,555,917
Nodejs (54,817
Linux (16,549
Windows (9,726
Electron (6,107
Mac (1,455
Build (1,175
Electron App (1,160
Related Projects