Skip to content

Instantly share code, notes, and snippets.

@Usse
Created January 19, 2014 20:46
Show Gist options
  • Save Usse/8510797 to your computer and use it in GitHub Desktop.
Save Usse/8510797 to your computer and use it in GitHub Desktop.
Gruntfile for general Web development
/* Description : Gruntfile for general Web development
* Version : 1.0
* Author : Andrea Usseglio (andrea.usseglio@gmail.com)
* License : GPL
*/
module.exports = function(grunt) {
require("matchdep").filterDev("grunt-*").forEach(grunt.loadNpmTasks);
grunt.initConfig({
pkg : grunt.file.readJSON('package.json'),
sass: {
dist: {
options : {
'style' : 'compact'
},
files: [{
expand: true,
cwd: 'css',
src: ['*.scss'],
dest: 'css',
ext: '.css'
}]
}
},
watch : {
html : {
files : ['*.html'],
tasks : [],
options: {
livereload: true
}
},
css : {
files : ['css/*.scss'],
tasks : ['sass'],
options: {
livereload: true
}
},
js : {
files : ['js/*.js'],
tasks : [],
options: {
livereload: true
}
}
},
open : {
dev : {
path: 'http://localhost/spabe/',
app: 'Google Chrome'
}
}
});
grunt.registerTask('default',[]);
grunt.registerTask('dev',['open:dev', 'watch']);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment