diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 0000000..8e6a47f --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,39 @@ +module.exports = function(grunt) { + + // Project configuration. + grunt.initConfig({ + pkg: grunt.file.readJSON('package.json'), + uglify: { + options: { + banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n' + }, + build: { + src: 'src/<%= pkg.name %>.js', + dest: 'build/<%= pkg.name %>.min.js' + } + }, + /** + * generate plato report in plato-report subfolder + */ + plato: { + options: { + // Task-specific options go here. + }, + your_target: { + // Target-specific file lists and/or options go here. + files: { + 'plato-report': ['public/js/*.js'] + } + }, + }, + + }); + + // Load the plugin that provides the "uglify" task. + grunt.loadNpmTasks('grunt-contrib-uglify'); + grunt.loadNpmTasks('grunt-plato'); + + // Default task(s). + grunt.registerTask('default', ['uglify']); + +}; \ No newline at end of file diff --git a/package.json b/package.json index 3ef7bb7..f10defe 100644 --- a/package.json +++ b/package.json @@ -1,13 +1,20 @@ { - "name": "jscribble", - "version": "0.0.1", - "private": false, - "dependencies": { - "express": "~2.5.8", - "ejs": "~0.7.1", - "socket.io": "~0.9.6", - "socket.io-client": "~0.9.6", - "expresso":"~0.9.2" + "name": "jscribble", + "version": "0.0.1", + "private": false, + "dependencies": { + "express": "~2.5.8", + "ejs": "~0.7.1", + "socket.io": "~0.9.6", + "socket.io-client": "~0.9.6", + "expresso": "~0.9.2" + }, + "devDependencies": { + "grunt": "~0.4.1", + "grunt-contrib-jshint": "~0.1.1", + "grunt-contrib-watch": "~0.3.1", + "grunt-plato": "~0.1.5", + "grunt-contrib-uglify": "~0.2.0" }, "engines": { "node": "0.8.x" @@ -15,4 +22,4 @@ "scripts": { "test": "expresso test/*" } -} \ No newline at end of file +}