-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathGruntfile.js
102 lines (100 loc) · 3.17 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
module.exports = function(grunt){
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
uglify: {
options: {
banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n'
},
build: {
src: 'client/scripts/app.js',
dest: 'server/public/assets/scripts/app.min.js'
},
controllers: {
src: "client/scripts/controllers/*",
dest: "server/public/assets/scripts/controllers/controller.min.js"
}
},
copy: {
angular: {
expand: true,
cwd: 'node_modules',
src: [
"angular/angular.min.js",
"angular/angular.min.js.map"
],
"dest": "server/public/vendors/"
},
angularRoutes: {
expand: true,
cwd: 'node_modules',
src: [
"angular-route/angular-route.min.js",
"angular-route/angular-route.min.js.map"
],
"dest": "server/public/vendors/"
},
angularAria: {
expand: true,
cwd: 'node_modules',
src: [
"angular-aria/angular-aria.min.js",
"angular-aria/angular-aria.min.js.map"
],
"dest": "server/public/vendors/"
},
angularMaterial: {
expand: true,
cwd: 'node_modules',
src: [
"angular-material/angular-material.min.css",
"angular-material/angular-material.min.js"
],
"dest": "server/public/vendors/"
},
angularAnimate: {
expand: true,
cwd: 'node_modules',
src: [
"angular-animate/angular-animate.min.js",
"angular-animate/angular-animate.min.js.map"
],
"dest": "server/public/vendors/"
},
style: {
expand: true,
cwd: 'client',
src: [
"styles/*"
],
"dest": "server/public/assets"
},
assets: {
expand: true,
cwd: 'client',
src: [
"images/*"
],
"dest": "server/public/assets"
},
views: {
expand: true,
cwd: 'client',
src: [
"views/*"
],
"dest": "server/public/assets"
},
htmlRoutes: {
expand: true,
cwd: 'client/',
src: [
"views/routes/*"
],
"dest": "server/public/assets"
}
}
});
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.registerTask('default', ['copy', 'uglify']);
};