install nvm UNIX https://github.com/creationix/nvm Windows https://github.com/coreybutler/nvm-windows
nvm install 6.12.0
nvm alias default 6.12.0
Then source or reopen all terminals. npm --version
should now return 6.12.0
Now install a recent version of NPM globally.
npm install -g npm@latest
install and config IDE of choice
- Webstorm
- Visual Studio Code
- Atom
download the starter kit
git clone https://github.com/soupala/etr-kit
install the 3rd party packages
npm install
start the app in dev mode
npm run dev
run tests
npm run test
- Automatic transpilation, building, and hot-reloading on file save.
- Tree shaking
- Linting (AirBnB styleguide).
- Prettier auto-code formatting (Atom only)
- Example unit test with Jest.
- Prettier auto-code formatting (config and how-to guide for Webstorm and VS Code).
- State management and middleware examples.
- Example components and containers written in TypeScript.
- Debugging.
- Example E2E tests with NightmareJS.
- Yeoman-style generators.
- Example icons in /build.
- Proxy requests to multiple API endpoints crossing multiple namespaces.
- Example parallel services automatically spun up as part of dev, prod, and distribution.
- Pipes and Interfaces between UI and the parallel services.
- Self-updating distribution (delta applied from tag of Github repo, for example).
$ npm install --save-dev devtron
// After starting the Electron app in dev mode, run the following from the Console tab:
require('devtron').install() // You should now see a Devtron tab added to the DevTools
IPC
- message-like interface
- how does it work under the hood? [https://en.wikipedia.org/wiki/Named_pipe](named pipes)
- values must be serializable, meaning must be able to JSON.stringify(value)
REMOTE
- values must be serializable, meaning must be able to JSON.stringify(value)
- the built-in remote module is synchronous and may be blocking to the UI until method completes
- use https://github.com/electron-userland/electron-remote whenever possible
- modules can be written for consumption in either process
example shared module
const electron = require('electron');
const foo = electron.foo || electron.remote.foo;
// now you can use module in either main or renderer process
console.log(foo);
- renderer process task pool that will split and balance a job across multiple processes
- library for promise-like background processes that auto-scale based on usage https://github.com/electron-userland/electron-remote
- coming soon
See the LICENSE file for license rights and limitations (MIT).