Added node-webkit grunt build
This commit is contained in:
parent
1c7d4f2396
commit
9e528e5f00
|
@ -1,2 +1,3 @@
|
|||
build/
|
||||
node_modules/
|
||||
npm-debug.log
|
||||
|
|
25
Gruntfile.js
25
Gruntfile.js
|
@ -1,19 +1,34 @@
|
|||
module.exports = function(grunt) {
|
||||
grunt.initConfig({
|
||||
uglify: {
|
||||
options: {
|
||||
compress: false
|
||||
},
|
||||
js: {
|
||||
files: {
|
||||
"client/js/components.min.js": [
|
||||
"client/components/*.js",
|
||||
"client/components/**/*.js"
|
||||
]
|
||||
"client/js/components.min.js": "client/components/**/*.js"
|
||||
}
|
||||
}
|
||||
},
|
||||
nodewebkit: {
|
||||
src: "./**/*",
|
||||
options: {
|
||||
build_dir: "./build",
|
||||
mac: false
|
||||
}
|
||||
}
|
||||
});
|
||||
grunt.loadNpmTasks("grunt-contrib-uglify");
|
||||
grunt.loadNpmTasks("grunt-node-webkit-builder");
|
||||
grunt.registerTask(
|
||||
"build",
|
||||
function() {
|
||||
require("child_process").exec("rm -rf ./build");
|
||||
grunt.task.run("nodewebkit");
|
||||
}
|
||||
);
|
||||
grunt.registerTask(
|
||||
"default",
|
||||
["uglify"]
|
||||
"uglify"
|
||||
);
|
||||
};
|
||||
|
|
File diff suppressed because one or more lines are too long
15
package.json
15
package.json
|
@ -15,7 +15,15 @@
|
|||
"irc",
|
||||
"server"
|
||||
],
|
||||
"main": "./index.js",
|
||||
"main": "http://localhost:9000/",
|
||||
"node-main": "./index.js",
|
||||
"single-instance": false,
|
||||
"window": {
|
||||
"title": "Shout",
|
||||
"toolbar": false,
|
||||
"height": 640,
|
||||
"width": 1024
|
||||
},
|
||||
"scripts": {
|
||||
"start": "node index.js"
|
||||
},
|
||||
|
@ -32,8 +40,7 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"grunt": "~0.4.5",
|
||||
"grunt-contrib-jshint": "~0.10.0",
|
||||
"grunt-contrib-watch": "~0.6.1",
|
||||
"grunt-contrib-uglify": "~0.5.0"
|
||||
"grunt-contrib-uglify": "~0.5.0",
|
||||
"grunt-node-webkit-builder": "~0.1.21"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue