Skip to content

Instantly share code, notes, and snippets.

@adampatterson
Created November 21, 2013 06:08
Show Gist options
  • Save adampatterson/7576787 to your computer and use it in GitHub Desktop.
Save adampatterson/7576787 to your computer and use it in GitHub Desktop.
My Grunt task
module.exports = function(grunt) {
grunt.registerTask('watch', [ 'watch' ]);
grunt.initConfig({
recess: {
options: {
compile: true,
},
dock: {
options: {
compress: false
},
files: {
"css/style.css": "less/style.less",
"css/ie.css": "less/ie.less"
}
}
},
concat: {
js: {
options: {
separator: ';'
},
src: [
// 'assets/js/*.js'
'js/jquery.js',
'js/easing.js',
'js/jquery-color.js',
'js/imagesloaded.js',
'js/html5shiv.js',
'js/retina.js',
'js/init.js'
],
dest: 'js/init.min.js'
}
},
uglify: {
options: {
mangle: false
},
js: {
files: {
'js/application.min.js': "js/application.js"
}
}
},
copy: {
images: {
expand: true,
flatten: true,
src: ['_content/*/*'],
dest: 'images/',
filter: 'isFile'
}
},
watch: {
image: {
files: ['_content/*/*'],
tasks: ['copy:images']
},
js: {
files: ['js/*.js'],
tasks: ['concat:js', 'uglify:js']
},
css: {
files: ['less/*.less','less/*/*.less'],
tasks: ['recess']
},
}
});
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-recess');
grunt.loadNpmTasks('grunt-contrib-watch');
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment