-
Notifications
You must be signed in to change notification settings - Fork 4
/
Gruntfile.js
119 lines (116 loc) · 4.01 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
module.exports = function (grunt) {
grunt.initConfig({
concat: {
bowerjs: {
src: [
'./bower_components/angular/angular.js',
'./bower_components/angular-animate/angular-animate.js',
'./bower_components/angular-aria/angular-aria.js',
'./bower_components/angular-touch/angular-touch.js',
'./bower_components/angular-resource/angular-resource.js',
'./bower_components/angular-material/angular-material.js',
'./bower_components/angular-ui-router/release/angular-ui-router.js',
'./bower_components/angular-file-data-url/src/fileDataUrl.js',
'./bower_components/marked/lib/marked.js',
'./bower_components/angular-marked/angular-marked.js',
'./bower_components/ng-file-upload/ng-file-upload-all.js',
'./bower_components/ngmap/build/scripts/ng-map.js'
],
dest: './public/dist/bower.js'
},
// scriptsjs: {
// src: [
// './public/app/**/*.js'
// ],
// dest: './public/dist/script.js'
// },
scriptsjs: {
src: [
'./public/app/**/*.js'
],
dest: './public/dist/script.min.js'
},
bowercss: {
src: [
'./bower_components/angular-material/angular-material.css'
],
dest: './public/dist/bower.css'
},
customcss: {
src: [
'./public/css/**/*.css'
],
dest: './public/dist/style.css'
}
},
// uglify: {
// bowerjs: {
// files: {
// './public/dist/bower.min.js': './public/dist/bower.js'
// }
// },
// scriptsjs: {
// files: {
// './public/dist/script.min.js': './public/dist/script.js'
// }
// }
// },
cssmin: {
bowercss: {
files: {
'./public/dist/bower.min.css': './public/dist/bower.css'
}
},
customcss: {
files: {
'./public/dist/style.min.css': './public/dist/style.css'
}
}
},
watch: {
// scripts: {
// files: ['./public/app/**/*.js'],
// tasks: ['concat:scriptsjs', 'uglify:scriptsjs']
// },
scripts: {
files: ['./public/app/**/*.js'],
tasks: ['concat:scriptsjs']
},
css: {
files: ['./public/css/**/*.css'],
tasks: ['concat:customcss', 'cssmin:customcss']
},
html: {
files: ['./public/app/**/*.html'],
tasks: ['copy:html']
},
json: {
files: ['./public/app/**/*.json'],
tasks: ['copy:json']
}
},
copy: {
html: {
cwd: './public/app/',
src: '**/*.html',
dest: './public/dist/app/',
expand: true
},
json: {
cwd: './public/app/',
src: '**/*.json',
dest: './public/dist/app/',
expand: true
}
}
});
//Loading NPM tasks
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-copy');
//default task
// grunt.registerTask('default', ['concat', 'uglify', 'cssmin', 'copy']);
grunt.registerTask('default', ['concat', 'cssmin', 'copy']);
};