-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathGruntfile.js
58 lines (53 loc) · 1.89 KB
/
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/*global module */
module.exports = function (grunt) {
"use strict";
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
uglify: {
min: {
files: grunt.file.expandMapping(['src/core/*.js', 'src/plugins/**/*.js'], 'dist/', {
rename: function (destBase, destPath) {
return destBase + destPath.replace("src/", "").replace('.js', '.min.js');
}
})
},
dev: {
files: grunt.file.expandMapping(['src/core/*.js', 'src/plugins/**/*.js'], 'dist/', {
rename: function (destBase, destPath) {
return destBase + destPath.replace("src/", "").replace('.js', '.min.js');
}
}),
options: {
beautify: true,
mangle: false,
sourceMap: true
}
}
},
cssmin: {
target: {
files: grunt.file.expandMapping(['src/core/*.css', 'src/plugins/**/*.css'], 'dist/', {
rename: function (destBase, destPath) {
return destBase + destPath.replace("src/", "").replace('.css', '.min.css');
}
})
}
},
jsdoc : {
dist : {
options: {
destination : './docs',
configure : ".jsdoc.json"
}
}
}
});
// Load the plugin that provides the "uglify" task.
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-jsdoc');
// Default task(s).
grunt.registerTask('default', ['uglify:min', 'cssmin']);
grunt.registerTask('dev', ['uglify:dev']);
};