From f5ef3cf86634a9709f81a3059a30526bb14a3f15 Mon Sep 17 00:00:00 2001 From: psychobunny Date: Fri, 30 Jan 2015 13:06:04 -0500 Subject: [PATCH] Gruntfile.js --- Gruntfile.js | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 Gruntfile.js diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 0000000000..19b0af68d0 --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,53 @@ +module.exports = function(grunt) { + grunt.initConfig({ + pkg: grunt.file.readJSON('package.json'), + execute: { + dev: { + src: 'a.js', + options: { + args: ['arg'] + } + }, + minifyJS: { + src: 'app.js', + options: { + args: ['from-file'] + } + }, + minifyCSS: { + src: 'app.js', + options: { + args: ['from-file'] + } + }, + }, + watch: { + clientScripts: { + files: ['public/src/**/*.js'], + tasks: ['execute:minifyJS'], + options: { + spawn: false + } + }, + serverScripts: { + files: ['*.js', 'src/**/*.js', 'node_modules/**/*.js'], + tasks: ['execute:minifyCSS'], + options: { + spawn: false + } + }, + less: { + files: ['**/*.less'], + tasks: ['execute:minifyCSS'], + options: { + spawn: false + } + } + } + }); + + grunt.loadNpmTasks('grunt-contrib-watch'); + grunt.loadNpmTasks('grunt-execute'); + + grunt.registerTask('default', ['watch', 'execute:minifyCSS']); +}; \ No newline at end of file