Grunt file cleanup

Better indenatation, more readable
This commit is contained in:
Amadeus Demarzi 2014-07-23 19:31:42 -07:00
parent c7d71da885
commit d6d4cf4b39
1 changed files with 55 additions and 57 deletions

View File

@ -1,69 +1,67 @@
// jshint node:true
module.exports = function(grunt) { module.exports = function(grunt) {
// Configuration goes here // Load plugins here
grunt.initConfig({ grunt.loadNpmTasks('grunt-contrib-less');
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');
less: { // Configuration goes here
development:{ grunt.initConfig({
files: {
"stylesheets/main.css": "stylesheets/main.less" less: {
} development:{
files: {
"stylesheets/main.css": "stylesheets/main.less"
} }
},
concat: {
options: {
separator: ';'
},
site: {
src: [
'javascripts/app/app.js',
'javascripts/app/util.js',
'javascripts/app/homepage.js'
],
dest: 'javascripts/app/deploy/site.js'
},
},
uglify: {
app: {
files: {
'javascripts/app/deploy/site.min.js': ['javascripts/app/deploy/site.js']
}
}
},
watch: {
less: {
files: 'stylesheets/*.less',
tasks: ['less']
},
js: {
files: 'javascripts/app/*.js',
tasks: ['concat', 'uglify']
}
} }
},
}); concat: {
options: {
separator: ';'
},
site: {
src: [
'javascripts/app/app.js',
'javascripts/app/util.js',
'javascripts/app/homepage.js'
],
dest: 'javascripts/app/deploy/site.js'
},
},
// Load plugins here uglify: {
grunt.loadNpmTasks('grunt-contrib-less'); app: {
grunt.loadNpmTasks('grunt-contrib-clean'); files: {
grunt.loadNpmTasks('grunt-contrib-concat'); 'javascripts/app/deploy/site.min.js': ['javascripts/app/deploy/site.js']
grunt.loadNpmTasks('grunt-contrib-connect'); }
grunt.loadNpmTasks('grunt-contrib-copy'); }
grunt.loadNpmTasks('grunt-contrib-uglify'); },
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-recess');
// JS distribution task. watch: {
grunt.registerTask('dist-js', ['concat', 'uglify']); less: {
files: 'stylesheets/*.less',
tasks: ['less']
},
js: {
files: 'javascripts/app/*.js',
tasks: ['concat', 'uglify']
}
}
// Full distribution task. });
grunt.registerTask('dist', ['dist-js']);
grunt.registerTask('default', ['watch']); // JS distribution task.
grunt.registerTask('dist-js', ['concat', 'uglify']);
// Full distribution task.
grunt.registerTask('dist', ['dist-js']);
grunt.registerTask('default', ['watch']);
}; };