-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathgruntfile.js
91 lines (88 loc) · 2.25 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
module.exports = function(grunt) {
// load grunt tasks based on dependencies in package.json
require('load-grunt-tasks')(grunt);
grunt.loadNpmTasks('grunt-rev');
grunt.config.init({
useminPrepare: {
index: {
src: ['index.html'],
options: {
dest: 'dist'
}
},
iframe: {
src: ['iframe.html'],
options: {
dest: 'dist'
}
}
},
usemin:{
html:['dist/index.html', 'dist/iframe.html']
},
rev: {
options: {
encoding: 'utf8',
algorithm: 'md5',
length: 8
},
assets: {
files: [{
src: [
'dist/*.{js,css}'
]
}]
}
},
copy:{
html: {
files: [
{
src: './index.html',
dest: 'dist/index.html'
},
{
src: './iframe.html',
dest: 'dist/iframe.html'
}
]
},
data: {
expand: true,
src: ['Data/*'],
dest: 'dist/'
},
icons: {
expand: true,
src: ['icons/**'],
dest: 'dist/'
},
bastrap: {
files: [
{
expand: true,
src: [ 'bastrap3/*.{png,svg}' ],
dest: 'dist/'
},
{
expand: true,
cwd: 'bastrap3/fonts/',
src: ['**'],
dest: 'dist/fonts/'
},
]}
}
});
grunt.registerTask('default',[
'copy:html',
'copy:data',
'copy:icons',
'copy:bastrap',
'useminPrepare',
'concat',
'uglify',
'cssmin',
'rev',
'usemin'
]);
}