A NW.js boilerplate. Grunt building and packaging. The sample app is not relevant (old requirejs + angular test).
src
: the appindex.html
: entry pointpackage.json
: node webkit manifestassets
: app assets (css + images)app
: logic app files
_build
: grunt builder
- Install NodeJS : http://nodejs.org/download
sudo npm install bower -g
sudo npm install grunt -g
cd _build
npm install
: installs node modules of the buildergrunt install
: installs the app dev kit (requires password on mac os to extend open files limit)
cd _build && grunt run
- Debug :
- Edit
package.json
- Change
window->toolbar
to true - Then
run
and click on thegear
- Edit
- Config target platforms in
_build/config.json
("platforms":["win", "osx"]
) cd _build && grunt package
- Add a node module from npm :
cd src && npm install the_module --save-dev
- Then, use with
require("the_module")
in the app code
- Add a requirejs module from bower :
cd src && bower install the_module --save
- Then, add path to
js/libs/vendor/the_module/path/to/jsFile
inapp/main.js
in path section and include module name in therequirejs
call
- Thanks to the Node Webkit team @ https://github.com/rogerwang/node-webkit
- Thanks to Joel Grenon for https://github.com/jgrenon/angular-desktop-app