-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathGruntfile.js
More file actions
69 lines (69 loc) · 1.91 KB
/
Copy pathGruntfile.js
File metadata and controls
69 lines (69 loc) · 1.91 KB
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
module.exports = function(grunt) {
grunt.initConfig({
copy: {
dist: {
cwd: 'src/', expand: true, src: '**', dest: 'dist/'
}
},
cssmin: {
dist: {
files: [
{ src: 'dist/static/ukhasnet.css', dest: 'dist/static/ukhasnet.min.css' }
],
options: {
keepSpecialComments: 0
}
}
},
concat: {
dist: {
files: {
'dist/static/jquerybootstrap.min.js': [
'dist/static/jquery/jquery.min.js',
'dist/static/bootstrap/js/bootstrap.min.js'
],
'dist/static/compiled.min.css': [
'dist/static/bootstrap/css/bootstrap.min.css',
'dist/static/ukhasnet.min.css'
],
},
},
},
processhtml: {
dist: {
files: {
'dist/index.html': ['src/index.html'],
'dist/map.html': ['src/map.html'],
'dist/nodeList.html': ['src/nodeList.html'],
'dist/nodeInfo.html': ['src/nodeInfo.html'],
'dist/nodeAdd.html': ['src/nodeAdd.html'],
'dist/nodeEdit.html': ['src/nodeEdit.html'],
'dist/logtail.html': ['src/logtail.html'],
}
}
},
compress: {
dist: {
options: {
mode: 'gzip',
level: 9
},
expand: true,
cwd: 'dist/',
src: ['**/*.html','**/*.css','**/*.js'],
dest: 'dist/',
rename: function(dest, src) {
return dest + src + '.gz';
}
}
}
});
// Load the plugins
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-processhtml');
grunt.loadNpmTasks('grunt-contrib-compress');
// Default tasks.
grunt.registerTask('default', ['copy', 'cssmin', 'concat', 'processhtml', 'compress']);
};