Skip to content

Instantly share code, notes, and snippets.

@drhayes
Last active August 28, 2015 19:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drhayes/4119d679a95fc6e42500 to your computer and use it in GitHub Desktop.
Save drhayes/4119d679a95fc6e42500 to your computer and use it in GitHub Desktop.
The file that builds my game using nw.js.
// Are you running me from "npm run build-native"? 'Cuz you should.
// Tips:
// * Copy what this guy did: https://github.com/octalmage/Marknote for icons
// and stuff.
// * Turn on devtools by changing "window.toolbar" in package.json to true.
var NwBuilder = require('nw-builder');
var nw = new NwBuilder({
files: [
'dist/**/*.*'
],//'./path/to/nwfiles/**/**', // use the glob format
platforms: ['osx64']//['osx32', 'osx64', 'win32', 'win64']
});
// Log things.
nw.on('log', console.log);
// Build returns a promise
nw.build().then(function() {
console.log('all done!');
}).catch(function(error) {
console.error(error);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment