consul/website/source/Gruntfile.js

70 lines
1.3 KiB
JavaScript
Raw Normal View History

2014-02-08 00:41:03 +00:00
module.exports = function(grunt) {
// Configuration goes here
grunt.initConfig({
2014-04-05 09:03:01 +00:00
less: {
development:{
files: {
"stylesheets/main.css": "stylesheets/main.less"
}
}
},
2014-02-08 00:41:03 +00:00
concat: {
options: {
separator: ';'
},
site: {
2014-04-05 09:03:01 +00:00
src: [
2014-02-08 00:41:03 +00:00
'javascripts/app/app.js',
'javascripts/app/util.js',
2014-04-05 09:03:01 +00:00
'javascripts/app/homepage.js'
2014-02-08 00:41:03 +00:00
],
dest: 'javascripts/app/deploy/site.js'
},
},
uglify: {
2014-04-08 19:34:56 +00:00
app: {
2014-02-08 00:41:03 +00:00
files: {
2014-04-05 09:03:01 +00:00
'javascripts/app/deploy/site.min.js': ['javascripts/app/deploy/site.js']
2014-02-08 00:41:03 +00:00
}
}
},
watch: {
2014-04-05 09:03:01 +00:00
less: {
files: 'stylesheets/*.less',
tasks: ['less']
},
2014-02-08 00:41:03 +00:00
js: {
files: 'javascripts/app/*.js',
tasks: ['concat', 'uglify']
}
}
});
// Load plugins here
2014-04-05 09:03:01 +00:00
grunt.loadNpmTasks('grunt-contrib-less');
2014-02-08 00:41:03 +00:00
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-recess');
2014-04-08 19:34:56 +00:00
// JS distribution task.
grunt.registerTask('dist-js', ['concat', 'uglify']);
2014-02-08 00:41:03 +00:00
2014-04-08 19:34:56 +00:00
// Full distribution task.
grunt.registerTask('dist', ['dist-js']);
2014-04-05 09:03:01 +00:00
grunt.registerTask('default', ['watch']);
2014-02-08 00:41:03 +00:00
2014-04-05 09:03:01 +00:00
};