-
Notifications
You must be signed in to change notification settings - Fork 1
/
GruntFile.js
29 lines (29 loc) · 883 Bytes
/
GruntFile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
module.exports = function (grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
zip: {
'build': {
src: ["*.html","js/*.js","js/lib/*.js","css/*.css","fonts/*", "jobs/*","img/*.png","icon.png","package.json"],
dest: 'build/<%= pkg.name %>_v<%= pkg.version %>.fma'
}
},
clean:{
current_version:{
src:'build/<%= pkg.name %>_v<%= pkg.version %>.fma'
},
all:{
src:'build'
}
},
});
// Load the plugin that provides the "uglify" task.
grunt.loadNpmTasks('grunt-zip');
grunt.registerTask('clean',function(arg){
grunt.file.delete(grunt.config('clean.current_version.src'));
});
grunt.registerTask('clean_all',function(arg){
grunt.file.delete(grunt.config('clean.all.src'));
});
grunt.registerTask('build', ['clean','zip']);
};