-
Notifications
You must be signed in to change notification settings - Fork 5
/
Gruntfile.js
52 lines (50 loc) · 1.08 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
module.exports = function(grunt) {
grunt.initConfig({
cssmin: {
target: {
files: {
'./site/dist/css/style.min.css':
[
'./site/src/css/normalize.css',
'./site/src/css/reset.css',
'./site/src/css/common.css',
'./site/src/css/nav.css',
'./site/src/css/header.css',
'./site/src/css/article.css'
]
}
}
},
copy: {
main: {
files: [
{
expand: true,
src: ['./site/src/js/*.js'],
dest: './site/dist/js/',
filter: 'isFile',
flatten: true
}
],
},
},
htmlmin: {
dist: {
options: {
removeComments: false,
collapseWhitespace: true,
minifyJS: true
},
files: {
'./site/dist/index.html': './site/index.html'
}
}
}
});
// Load tasks
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-htmlmin');
// Register tasks
grunt.registerTask('default', ['cssmin', 'copy', 'htmlmin']);
};