-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
77 lines (65 loc) · 2.26 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
"use strict";
module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-jsbeautifier');
grunt.initConfig({
pkg: grunt.file.readJSON("package.json"),
concat: {
dev: {
dest: "dist/<%= pkg.title %>.js",
src: [
"src/.prefix",
"src/_.js",
"src/core/Namespace/.prefix",
"src/core/Namespace/*.js",
"src/core/Namespace/.suffix",
"src/core/Meta/.prefix",
"src/core/Meta/*.js",
"src/core/Meta/.suffix",
"src/core/Clazz/.prefix",
"src/core/Clazz/*.js",
"src/core/Clazz/.suffix",
"src/core/Clazz.js",
"src/core/Namespace.js",
"src/core/Base.js",
"src/core/Factory.js",
"src/core/Manager.js",
"src/.build",
"src/components/.prefix",
"src/components/meta/*.js",
"src/components/meta/Property/.prefix",
"src/components/meta/Property/*.js",
"src/components/meta/Property/.suffix",
"src/components/clazz/*.js",
"src/components/.suffix",
"src/.suffix"
],
options: {
separator: '\n\n'
}
}
},
uglify: {
min: {
options: {
mangle: true,
compress: {
unused: false
},
report: 'gzip',
sourceMap: 'dist/<%= pkg.title %>.min.map',
preserveComments: false
},
dest: "dist/<%= pkg.title %>.min.js",
src: "<%= concat.dev.dest %>"
}
},
jsbeautifier: {
dev: {
src: ["<%= concat.dev.dest %>"]
}
}
});
grunt.registerTask('default', ['concat', 'uglify', 'jsbeautifier']);
};