Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
/**
* Paste your Gruntfile (or important parts of it) here
*
*/
module.exports = function(grunt) {
grunt.initConfig({
watch: {
options: {
livereload: true
},
html: {
files: ['**.php', '**.html'],
},
js: {
files: ['js/*.js'],
tasks: []
},
css: {
files: ['css/*.css'],
tasks: ['cssmin']
}
},
cssmin: {
main: {
expand: true,
src: ['css/*.css'],
dest: 'css/min',
ext: '.min.css'
}
}
});
grunt.event.on('watch', function(action, filepath, target) {
grunt.log.writeln(target + ': ' + filepath + ' has ' + action);
});
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-cssmin')
grunt.registerTask('default', ['watch']);
};
/**
* Other Code below
*
*/

System Info

Output of these commands:

grunt --version && node --version && npm --version

"grunt": "~0.4.2"

Operating system details:

  • What OS are you running? Is it 32-bit, 64-bit? Ubuntu 13.04

Other details

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment