-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
115 lines (113 loc) · 3.11 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
module.exports = function(grunt) {
'use strict';
grunt.initConfig({
clean: [
'_site/css',
'_site/data',
'_site/img',
'_site/js',
'_site/ui',
'_site/iframe.html'
],
copy: {
site: {
files: [{
cwd: 'assets/libs/bootstrap-editable/img/',
dest: '_site/img/',
expand: true,
src: [
'**/*'
]
},{
cwd: 'assets/libs/bootstrap-slider/img/',
dest: '_site/img/',
expand: true,
src: [
'**/*'
]
},{
cwd: 'data/',
dest: '_site/data/',
expand: true,
src: [
'**/*'
]
},{
cwd: 'img/',
dest: '_site/img/',
expand: true,
src: [
'**/*'
]
},{
cwd: 'ui/',
dest: '_site/ui/',
expand: true,
src: [
'**/*'
]
}]
}
},
cssmin: {
site: {
files: {
'_site/css/app.min.css': [
'assets/libs/alertify/css/alertify-core.css',
'assets/libs/alertify/css/alertify-bootstrap.css',
'assets/libs/bootstrap-editable/css/bootstrap-editable.css',
'assets/libs/bootstrap-select/css/bootstrap-select.css',
'assets/libs/bootstrap-colorpickersliders/bootstrap.colorpickersliders.css',
'assets/libs/bootstrap-slider/css/bootstrap-slider.css',
'assets/libs/typeahead/typeahead.css',
'css/app.css'
]
}
}
},
htmlmin: {
site: {
files: {
'_site/iframe.html': 'iframe.min.html',
'_site/index.html': 'index.min.html'
},
options: {
collapseBooleanAttributes: true,
collapseWhitespace: true,
removeAttributeQuotes: true,
removeComments: true,
removeCommentsFromCDATA: true,
removeRedundantAttributes: true
}
}
},
pkg: require('./package.json'),
uglify: {
site: {
options: {
beautify: false
},
files: {
'_site/js/app.min.js': [
'assets/libs/alertify/js/alertify.js',
'assets/libs/bootstrap-colorpickersliders/bootstrap.colorpickersliders.js',
'assets/libs/bootstrap-editable/js/bootstrap-editable.js',
'assets/libs/bootstrap-editable/js/bootstrap-filestyle.js',
'assets/libs/bootstrap-select/js/bootstrap-select.js',
'assets/libs/bootstrap-slider/js/bootstrap-slider.js',
'assets/libs/jquery-nestable/js/jquery-nestable.js',
'assets/libs/moment.js',
'assets/libs/typeahead/typeahead.js',
'js/app.js'
]
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-htmlmin');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.registerTask('default', ['clean', 'htmlmin', 'copy', 'cssmin', 'uglify']);
};