mirror of
https://github.com/Threnklyn/MinecraftChat.git
synced 2026-05-31 18:28:28 +02:00
Added grunt watch and grunt server
This commit is contained in:
@@ -34,14 +34,33 @@ module.exports = function(grunt) {
|
|||||||
options: {
|
options: {
|
||||||
mangle: false
|
mangle: false
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
watch: {
|
||||||
|
client: {
|
||||||
|
files: ['app/client/**/*.js'],
|
||||||
|
tasks: ['debug']
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
nodemon: {
|
||||||
|
dev: {
|
||||||
|
script: ['app/server'],
|
||||||
|
options: {
|
||||||
|
watch: ['app/server']
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
grunt.loadNpmTasks('grunt-browserify');
|
grunt.loadNpmTasks('grunt-browserify');
|
||||||
|
grunt.loadNpmTasks('grunt-nodemon');
|
||||||
grunt.loadNpmTasks('grunt-contrib-uglify');
|
grunt.loadNpmTasks('grunt-contrib-uglify');
|
||||||
|
grunt.loadNpmTasks('grunt-contrib-watch');
|
||||||
|
|
||||||
grunt.registerTask('build', ['browserify:pro', 'uglify']);
|
grunt.registerTask('build', ['browserify:pro', 'uglify']);
|
||||||
grunt.registerTask('debug', ['browserify:dev']);
|
grunt.registerTask('debug', ['browserify:dev']);
|
||||||
|
grunt.registerTask('server', ['nodemon']);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -20,4 +20,6 @@ This will start the application on port `3000` or the one specified by the `PORT
|
|||||||
###Grunt tasks
|
###Grunt tasks
|
||||||
|
|
||||||
* `grunt debug` - Builds the client-side javascript application with no minification
|
* `grunt debug` - Builds the client-side javascript application with no minification
|
||||||
* `grunt build` - Builds the client-side javascript application with minification
|
* `grunt build` - Builds the client-side javascript application with minification
|
||||||
|
* `grunt watch` - Automatically runs `grunt debug` when client-side code changes
|
||||||
|
* `grunt server` - Starts server and automatically restart when server-side code changes
|
||||||
@@ -10,6 +10,8 @@
|
|||||||
"grunt": "^0.4.5",
|
"grunt": "^0.4.5",
|
||||||
"grunt-browserify": "^3.7.0",
|
"grunt-browserify": "^3.7.0",
|
||||||
"grunt-contrib-uglify": "^0.9.1",
|
"grunt-contrib-uglify": "^0.9.1",
|
||||||
|
"grunt-contrib-watch": "^0.6.1",
|
||||||
|
"grunt-nodemon": "^0.4.0",
|
||||||
"mineflayer": "git@github.com:andrewrk/mineflayer.git",
|
"mineflayer": "git@github.com:andrewrk/mineflayer.git",
|
||||||
"socket.io": "^1.3.5",
|
"socket.io": "^1.3.5",
|
||||||
"socket.io-redis": "^0.1.4"
|
"socket.io-redis": "^0.1.4"
|
||||||
|
|||||||
Reference in New Issue
Block a user