Created
September 7, 2015 02:02
-
-
Save badcrocodile/9d89c7ce29e9908b4210 to your computer and use it in GitHub Desktop.
My working gruntfile.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function(grunt) { | |
require('time-grunt')(grunt); | |
require('load-grunt-config')(grunt, { | |
jitGrunt: true | |
}); | |
grunt.initConfig({ | |
less: { | |
development: { | |
options: { | |
compress: false, | |
yuicompress: false, | |
optimization: 2, | |
sourceMap: true, | |
// sourceMapFilename: "assets/style/bootstrap.css.map", | |
sourceMapFilename: "style.css.map", | |
// sourceMapBasepath: "assets/style/" | |
sourceMapBasepath: "html/sites/all/themes/corvilla/css/" | |
}, | |
files: { | |
// target.css file: source.less file | |
// "assets/style/bootstrap.css": "assets/style/bootstrap.less" | |
"html/sites/all/themes/corvilla/css/style.css" : "html/sites/all/themes/corvilla/less/style.less" | |
} | |
} | |
}, | |
watch: { | |
styles: { | |
// Which files to watch (all .less files recursively in the less directory) | |
// files: ['assets/style/theme/**/*.less'], | |
files: ['html/sites/all/themes/corvilla/**/*.less'], | |
tasks: ['less'], | |
options: { | |
nospawn: true | |
} | |
} | |
} | |
}); | |
grunt.loadNpmTasks('grunt-contrib-less'); | |
grunt.loadNpmTasks('grunt-contrib-watch'); | |
grunt.registerTask('default', ['watch']); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment