Boilerplate application for Electron.
The repo's idea based on https://github.com/szwacz/electron-boilerplate.git
This project gives you mainly three things:
- Cross-platform development environment (works the same way on OSX, Windows and Linux).
- Basic structure for Electron app.
- Scripts to generate app for all three operating systems (Tested only on OSX).
The project dependent on Node.js and Gulp. So just make sure you have they installed.
npm install
npm run start
Also, you can use gulp
commands, they are pretty much the same.
There are two package.json
files:
Sits on path: electron-boilerplate/package.json
. Here you declare dependencies for your development environment and build scripts. This file is not distributed with real application!
Also here you declare the version of Electron runtime you want to use:
"devDependencies": {
"electron-prebuilt": "^0.30.2"
}
Sits on path: electron-boilerplate/app/package.json
. This is real manifest of your application. Declare your app dependencies here.
app
- code of your application goes here.config
- place for you to declare environment specific stuff.build
- in this folder lands built, runnable application.releases
- ready for distribution installers will land here.gulp
- gulp tasks.
npm install
It will also download Electron runtime, and install dependencies for second package.json
file inside app
folder.
npm start
To install native module you need just run npm install
in app
folder. It will call electron-rebuild
(Read more).
electron-boilerplate has preconfigured karma unit test runner. To run it go with standard:
npm run test
You don't have to declare paths to spec files in any particular place. The runner will search through the project for all *.spec.js
files and include them automatically.
You can see your code coverage in coverage
folder.
To make executable app:
npm run release
It will start the packaging process for operating system you are running this command on (Currently for OSX only). Ready for distribution file will be outputted to releases
directory.
The MIT License (MIT)