Created
August 5, 2015 18:16
-
-
Save coderdiaz/344241556e3e5066cf5d to your computer and use it in GitHub Desktop.
Gruntfile.js
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('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