Skip to content

Instantly share code, notes, and snippets.

@raduGaspar
Created March 27, 2016 15:20
Show Gist options
  • Save raduGaspar/b482a8484385a72de0c1 to your computer and use it in GitHub Desktop.
Save raduGaspar/b482a8484385a72de0c1 to your computer and use it in GitHub Desktop.
nw-builder package logic for nwjs desktop applications
var NwBuilder = require('nw-builder'),
buildsDir = 'c:/builds',
opts = {
files: './dist/**', // use the glob format
version: '0.12.0',
buildDir: buildsDir + '/build/',
cacheDir: buildsDir + '/cache/',
platforms: ['win64', 'osx64', 'linux64']
},
nw = new NwBuilder(opts);
// log build details
nw.on('log', console.log);
// start build
nw.build().then(function() {
console.log('App packaged in', opts.buildDir);
}).catch(function(error) {
console.error(error);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment