Added node-webkit grunt build

This commit is contained in:
Mattias Erming 2014-07-09 03:38:38 +02:00
parent 1c7d4f2396
commit 9e528e5f00
4 changed files with 40 additions and 17 deletions

1
.gitignore vendored
View file

@ -1,2 +1,3 @@
build/
node_modules/
npm-debug.log

View file

@ -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

View file

@ -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"
}
}