Electron app with React.js
npm i
npm start
- open application in build directory
- add some react components and styles
- reload application (⌘+R)
To call Electron's api, it is necessary to use window.require because, browserify rewrites require statement.
ex) var remote = window.require( 'remote' );
Run npm run refactor
to refactor the code in accordance to jscs preset specified in the .jscsrc
file.
Run npm run lint
to run a linter through the codebase. The linter will check
the codebase as specified in the configuration file named .eslintrc
. Fix all reported
errors prior to committing code.
An example of a .eslintrc
follows:
{
"ecmaFeatures": {
"blockBindings": true,
"jsx": true
},
"rules": {
"semi": 2
}
}