Skip to content

Instantly share code, notes, and snippets.

Created February 7, 2014 18:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/8868625 to your computer and use it in GitHub Desktop.
Save anonymous/8868625 to your computer and use it in GitHub Desktop.
/**
* 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