Note: Whether you have native dependencies in your app or not, I assume it's nice to always have node-gyp build tools installed on your machine.
npm install --global --production windows-build-toolsfrom CMD or Powershell (With Admin)
For Ubuntu: Follow My Answer On Stackoverflow
First, clone the repository from github:
$ git clone https://github.com/mjangir/reactron.git
And then install dependencies with npm:
$ npm install
Start the app in the dev environment. This starts the renderer process in hot-module-replacement mode and starts a webpack dev server that sends hot updates to the renderer process:
$ npm run dev
Alternatively, you can run the renderer and main processes separately. This way, you can restart one process without waiting for the other. Run these two commands simultaneously in different console tabs:
$ npm run start-renderer-dev $ npm run start-main-dev
You can also run a webpack compiled main process with the following:
$ npm start
To package apps for the local platform:
$ npm run package
To package apps for all platforms:
First, refer to Multi Platform Build for dependencies. Then,
$ npm run package-all
The project has some of the common desktop application features integrated:
- Auto Update: Publish your electron app on Github or Amazon S3 by updating the credentials in package.json. Then click on the Check For Updates in Help menu. For more information on publishing the app, check this out.
- Auto Launch On Start: On settings page, when you check Auto Launch At Start option, the app will be automatically started on windows or osx startup.
- Show Tray Icon: On settings page, you can toggle Show Tray Icon option to show the icon in tray. Currently it has only quit option in the tray context menu.
- Start Minimized: If you check this option, the application will be started minimized.
- Apart from that, window state keeper has been added to retain the last window sizes and dimesion.
How to keep your project updated with the boilerplate
If your application is a fork from this repository, you can add this repo to another git remote:
git remote add upstream https://github.com/mjangir/reactron.git
Then, use git to merge some latest commits:
git pull upstream master
MIT © Manish Jangir