-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
50 lines (46 loc) · 1.13 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
module.exports = function (grunt) {
// 项目配置
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
dist: {
src: [
'src/utils.js',
'src/handler/default-data-handler.js',
'src/handler/checkbox-boolean-handler.js',
'src/model.js',
'src/ui-data.js'
],
dest: 'dist/ui-data.js',
minDest: 'dist/ui-data.min.js'
},
cjs: {
src: [
'src/utils.js',
'src/handler/default-data-handler.js',
'src/handler/checkbox-boolean-handler.js',
'src/model.js',
'src/ui-data.js'
],
dest: 'cjs/ui-data.js'
},
'dist-mock': {
src: [
'src/utils.js',
'src/mock/model-mock.js',
'src/mock/ui-data-mock.js'
],
dest: 'dist/ui-data-mock.js',
minDest: 'dist/ui-data-mock.min.js'
},
'cjs-mock': {
src: [
'src/utils.js',
'src/mock/model-mock.js',
'src/mock/ui-data-mock.js'
],
dest: 'cjs/ui-data-mock.js'
}
});
grunt.loadTasks('build/tasks');
grunt.registerTask('default', ['dist', 'cjs', 'dist-mock', 'cjs-mock']);
};