forked from Z-Wave-Me/ExpertUI
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathGruntfile.js
131 lines (124 loc) · 5.06 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
120
121
122
123
124
125
126
127
128
129
130
131
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
// Clean dir
clean: {
options: { force: true },
build: ["dist/"]
},
// Concat
concat: {
indexhtml: {
src: ['index.tpl.html'],
dest: 'dist/index.html'
},
css: {
src: [
'app/css/bootstrap/bootstrap.css',
'app/css/main.css',
'app/css/font-awesome-4.1.0/css/font-awesome.min.css',
'app/css/angular-slider.css',
'app/css/main-responsive.css'
],
dest: 'dist/app/css/build.css'
},
js: {
src: [
// Vendors
'app/vendor/jquery/jquery-1.11.1.min.js',
'app/vendor/underscore/underscore-1.8.3/underscore-min.js',
'app/vendor/upload/angular-file-upload-shim.js',
// Angular
'app/vendor/angular/angular-1.2.14/angular.min.js',
'app/vendor/upload/angular-file-upload.js',
'app/vendor/angular/angular-1.2.14/angular-route.min.js',
'app/vendor/angular/angular-1.2.14/angular-resource.min.js',
'app/vendor/angular/angular-1.2.14/angular-cookies.min.js',
// Bootstrap
'app/vendor/bootstrap/bootstrap.min.js',
// XML
'app/vendor/xml/xml2json.js',
// Z-Wave uld ExpertU
'app/vendor/zwave/pyzw.js',
'app/vendor/zwave/pyzw_zwave_ui.js',
// APP
'app/core/app.js',
//'app/core/config.js',
'app/core/directives/directives.js',
'app/core/directives/angular-slider.js',
'app/core/filters/filters.js',
'app/core/factories/factories.js',
'app/core/services/services.js',
'app/core/controllers/controllers.js',
//'app/core/controllers/configuration-controller.js',
'app/core/controllers/configuration.js',
'app/core/controllers/assoc.js',
'app/core/jquery/jquery-app.js',
],
dest: 'dist/app/core/build.js'
}
},
// Copy
copy: {
main: {
files: [
{
src: [
'app/images/**',
'app/views/**',
'app/core/lang/**'
], dest: 'dist/'
},
{expand:true,src: ['app/core/config.js'], dest: 'dist/app/core/',flatten: true}
/*{src: ['storage/img/**'], dest: 'dist/'},
{src: ['storage/demo/**'], dest: 'dist/'},
{src: ['storage/data/**'], dest: 'dist/'}*/
]
},
fonts: {
files: [
{expand:true,src: ['app/css/font-awesome-4.1.0/fonts/*'], dest: 'dist/app/fonts/',flatten: true}
]
},
angmap: {
files: [
{expand:true,src: ['app/vendor/angular/angular-1.2.14/angular-cookies.min.js.map'], dest: 'dist/app/core/',flatten: true},
{expand:true,src: ['app/vendor/angular/angular-1.2.14/angular.min.js.map'], dest: 'dist/app/core/',flatten: true},
{expand:true,src: ['app/vendor/angular/angular-1.2.14/angular-route.min.js.map'], dest: 'dist/app/core/',flatten: true}
]
}
},
//CSSS min
cssmin: {
my_target: {
options: {
banner: '/* Minified css file */',
keepSpecialComments: 0
},
files: [
{
expand: true,
cwd: 'dist/app/css/',
src: ['*.css', '!*.min.css'],
dest: 'dist/app/css/',
ext: '.css'
}
]
}
}
});
// Load the plugin that provides the "uglify" task.
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-htmlmin');
grunt.loadNpmTasks('grunt-string-replace');
// Default task(s).
//grunt.registerTask('default', ['clean','concat','copy','cssmin','string-replace']);
grunt.registerTask('default', ['clean','concat','copy','cssmin']);
};