React, Semantic, Browserify, and Babel boilerplate running in node-webkit.
First off, you need to have NPM installed. Then run:
npm install
Build the package before first run and after any changes:
npm run build
Then, start the application:
npm start
If you get 'Hello, world!' with some clicky buttons, all's working:
The package.json
file contains both the dev (sdk) and production builds of
nw.js. This is to allow developer tools (F12) along with other stuff useful for
debugging purposes. When setting up for production, remove
nwjs_build_type=sdk
from .npmrc
. Then, instead of using npm install
, use
npm install --only=prod
. Note that switching between dev and prod requires
that you delete your node_modules
directory first.
If for some reason the build fails, start by remove the carets (^) in front of
the version numbers in package.json
as an initial troubleshooting step.
Once you're sure it's not a version problem, restore the carets as version
locking often leads to major security issues in production. Remember to check
your project for known issues with npm audit fix
.