-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathbuild.js
More file actions
50 lines (41 loc) · 1.26 KB
/
build.js
File metadata and controls
50 lines (41 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
var NwBuilder = require('nw-builder');
// var gulp = require('gulp');
// var gutil = require('gulp-util');
// gulp.task('nw', function () {
// var nw = new NwBuilder({
// // version: '0.14.6',
// files: './public/*',
// macIcns: './icons/app.icns',
// // macPlist: {mac_bundle_id: 'myPkg'},
// // platforms: ['win32', 'win64', 'osx64']
// platforms: ['osx64'],
// buildDir: './build'
// });
// // Log stuff you want
// nw.on('log', function (msg) {
// gutil.log('nw-builder', msg);
// });
// // Build returns a promise, return it so the task isn't called in parallel
// return nw.build().catch(function (err) {
// console.log(err);
// gutil.log('nw-builder', err);
// });
// });
// gulp.task('default', ['nw']);
var nw = new NwBuilder({
version: '0.17.4',
files: './public/**',
macIcns: './icons/app.icns',
// macPlist: {mac_bundle_id: 'myPkg'},
// platforms: ['win32', 'win64', 'osx64']
platforms: ['win64', 'osx64', 'linux64'],
buildDir: './build'
});
//Log stuff you want
nw.on('log', console.log);
// Build returns a promise
nw.build().then(function () {
console.log('all done!');
}).catch(function (error) {
console.error(error);
});