Add contrib-clean to Grunt.
We should clean 'min' directory before build.
This commit is contained in:
parent
7e5b225d61
commit
dd89f14243
@ -10,6 +10,9 @@ module.exports = function (grunt) {
|
||||
'<%= pkg.homepage ? "* " + pkg.homepage + "\\n" : "" %>' +
|
||||
'* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' +
|
||||
' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %> */\n',
|
||||
clean: {
|
||||
files: ['min']
|
||||
},
|
||||
// Task configuration.
|
||||
uglify: {
|
||||
options: {
|
||||
@ -65,6 +68,7 @@ module.exports = function (grunt) {
|
||||
// These plugins provide necessary tasks.
|
||||
grunt.loadNpmTasks('grunt-contrib-uglify');
|
||||
grunt.loadNpmTasks('grunt-contrib-jshint');
|
||||
grunt.loadNpmTasks('grunt-contrib-clean');
|
||||
grunt.loadNpmTasks('grunt-contrib-csslint');
|
||||
grunt.loadNpmTasks('grunt-contrib-cssmin');
|
||||
|
||||
@ -76,6 +80,6 @@ module.exports = function (grunt) {
|
||||
});
|
||||
|
||||
grunt.registerTask('lint', ['jshint', 'csslint']);
|
||||
grunt.registerTask('build', ['uglify', 'cssmin']);
|
||||
grunt.registerTask('build', ['clean', 'uglify', 'cssmin']);
|
||||
|
||||
};
|
||||
|
@ -9,6 +9,7 @@
|
||||
"grunt-contrib-jshint": "~0.1.1",
|
||||
"grunt-contrib-uglify": "~0.1.1",
|
||||
"grunt-contrib-cssmin": "~0.6.1",
|
||||
"grunt-contrib-csslint": "~0.1.2"
|
||||
"grunt-contrib-csslint": "~0.1.2",
|
||||
"grunt-contrib-clean": "~0.4.1"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user