To install the task-runner, run:
$ npm install -g gulp
To install local dependencies, run:
$ npm install
To serve the app in node-webkit, run:
$ gulp serve
To build the app for Mac OSx & Window, run:
$ gulp build
var pkg = require('./package'); | |
var gulp = require('gulp'); | |
var gutil = require('gulp-util'); | |
var rimraf = require('rimraf'); | |
var shell = require('gulp-shell'); | |
var NwBuilder = require('node-webkit-builder'); | |
gulp.task('build', ['clean'], function() { | |
var nw = new NwBuilder({ | |
appName: pkg.window.title, | |
appVersion: pkg.version, | |
buildDir: 'dist', | |
files: ['package.json', 'src/**'], | |
macIcns: 'src/img/icon.icns', | |
platforms: ['win','osx'], | |
version: '0.10.1' | |
}); | |
nw.on('log', gutil.log); | |
return nw.build().catch(gutil.log); | |
}); | |
gulp.task('clean', function (cb) { | |
rimraf('dist', cb); | |
}); | |
gulp.task('serve', shell.task([ | |
'./node_modules/nodewebkit/bin/nodewebkit . --debug' | |
])); |
{ | |
"private": true, | |
"devDependencies": { | |
"gulp": "^3.8.7", | |
"gulp-shell": "^0.2.9", | |
"gulp-util": "~3.0.0", | |
"node-webkit-builder": "~0.1.1", | |
"rimraf": "~2.2.8" | |
} | |
} |