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/ node_modules/
npm-debug.log npm-debug.log

View File

@ -1,19 +1,34 @@
module.exports = function(grunt) { module.exports = function(grunt) {
grunt.initConfig({ grunt.initConfig({
uglify: { uglify: {
options: {
compress: false
},
js: { js: {
files: { files: {
"client/js/components.min.js": [ "client/js/components.min.js": "client/components/**/*.js"
"client/components/*.js",
"client/components/**/*.js"
]
} }
} }
},
nodewebkit: {
src: "./**/*",
options: {
build_dir: "./build",
mac: false
}
} }
}); });
grunt.loadNpmTasks("grunt-contrib-uglify"); 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( grunt.registerTask(
"default", "default",
["uglify"] "uglify"
); );
}; };

File diff suppressed because one or more lines are too long

View File

@ -15,7 +15,15 @@
"irc", "irc",
"server" "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": { "scripts": {
"start": "node index.js" "start": "node index.js"
}, },
@ -32,8 +40,7 @@
}, },
"devDependencies": { "devDependencies": {
"grunt": "~0.4.5", "grunt": "~0.4.5",
"grunt-contrib-jshint": "~0.10.0", "grunt-contrib-uglify": "~0.5.0",
"grunt-contrib-watch": "~0.6.1", "grunt-node-webkit-builder": "~0.1.21"
"grunt-contrib-uglify": "~0.5.0"
} }
} }