- Note: requires a node version >= 7 and an npm version >= 4.
First, clone the repo via git:
git clone --depth=1 https://github.com/chentsulin/electron-react-boilerplate.git your-project-name
And then install dependencies with yarn.
$ cd your-project-name
$ yarn
Note: If you can't use yarn for some reason, try npm install
.
Start the app in the dev
environment. This starts the renderer process in hot-module-replacement mode and starts a server that sends hot updates to the renderer process:
$ npm run dev
You Run these two commands simultaneously in different console tabs:
$ npm run start-renderer-dev
$ npm run start-main-dev
If you want to update extensions version, please set UPGRADE_EXTENSIONS
env, just run:
$ UPGRADE_EXTENSIONS=1 npm run dev
## Further commands
To run the application without packaging run
```bash
$ npm run build
$ npm start
To run End-to-End Test
$ npm run build
$ npm run test-e2e
Rule of thumb is: all modules go into ./package.json
except native modules. Native modules go into ./app/package.json
.
- If the module is native to a platform (like node-postgres) or otherwise should be included with the published package (i.e. bcrypt, openbci), it should be listed under
dependencies
in./app/package.json
. - If a module is
import
ed by another module, include it independencies
in./package.json
. See this ESLint rule. Examples of such modules arematerial-ui
,redux-form
, andmoment
. - Otherwise, modules used for building, testing and debugging should be included in
devDependencies
in./package.json
.
For creating an excellent electron boilerplate:
https://github.com/chentsulin/electron-react-boilerplate
MIT ©