Last active
August 28, 2015 19:44
-
-
Save drhayes/4119d679a95fc6e42500 to your computer and use it in GitHub Desktop.
The file that builds my game using nw.js.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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