Skip to content

Instantly share code, notes, and snippets.

@coderdiaz
Created August 5, 2015 18:16
Show Gist options
  • Save coderdiaz/344241556e3e5066cf5d to your computer and use it in GitHub Desktop.
Save coderdiaz/344241556e3e5066cf5d to your computer and use it in GitHub Desktop.
Gruntfile.js
module.exports = function (grunt) {
require('jit-grunt')(grunt);
grunt.initConfig({
less: {
development: {
options: {
compress: true,
yuicompress: true,
optimization: 2
},
files: {
'dist/css/api.min.css': '_less/api.less'
}
}
},
uglify: {
options: {
mangle: false
},
my_target: {
files: {
'dist/js/api.min.js': '_js/api.js',
'dist/js/notifications.min.js': '_js/notifications.js',
'dist/js/template.min.js': '_js/template.js'
}
}
},
watch: {
options: {
nospawn: true
},
less: {
files: ['_less/*.less'],
tasks: ['less']
},
uglify: {
files: ['_js/*.js'],
tasks: ['uglify']
}
}
});
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.registerTask('default', ['less', 'uglify', 'watch']);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment