-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathGruntfile.js
32 lines (28 loc) · 925 Bytes
/
Gruntfile.js
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
module.exports = function(grunt) {
grunt.initConfig({
nodewebkit: {
options: {
// Where the build version of the app is saved
build_dir: './webkitbuilds',
mac_icns: './icon.icns',
mac: true,
win: false,
linux32: false,
linux64: false
},
// Your node-webkit app
src: ['./node-webkit-src/**/*']
}
});
grunt.loadNpmTasks('grunt-node-webkit-builder');
grunt.registerTask('sfpasteboard', function() {
var done = this.async();
var fs = require('fs');
if (!fs.existsSync('node-webkit-src/tools')) {
fs.mkdirSync('node-webkit-src/tools');
}
var exec = require('child_process').exec;
exec('gcc -Wall -g -O3 -ObjC -framework Foundation -framework AppKit -o node-webkit-src/tools/sfpasteboard sfpasteboard/sfpasteboard.m', done);
});
grunt.registerTask('build', ['sfpasteboard', 'nodewebkit']);
};