Skip to content

Instantly share code, notes, and snippets.

@alexshive
Created November 19, 2013 01:00
Show Gist options
  • Select an option

  • Save alexshive/7538348 to your computer and use it in GitHub Desktop.

Select an option

Save alexshive/7538348 to your computer and use it in GitHub Desktop.
Grunt boilerplate
/*jslint node: true*/
'use strict';
module.exports = function(grunt){
grunt.initConfig({
compass: {
global: {
options: {
sassDir: 'sass',
cssDir: 'css',
force: true,
outputStyle: 'compressed' // nested, expanded, compact, compressed
}
}
},
watch: {
files: [
'sass/**',
'js/*.js'
],
tasks: ['compass', 'uglify']
},
uglify: {
options: {
compress: {
global_defs: {
"DEBUG": false
},
dead_code: true
}
},
my_target: {
files: {
'js/minified.js':
[
'js/file1.js',
'js/file2.js']
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-compass');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.registerTask('default', ['compass']);
}
// To run enter the following in terminal while in the project directory
// $ grunt watch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment