-
Notifications
You must be signed in to change notification settings - Fork 1
/
Gruntfile.js
60 lines (55 loc) · 2.32 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
module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
watch: {
scripts: {
files: ['*.js', 'docs/*.html', 'sources/**/*.html', 'sources/**/*.js', 'sources/**/*.json'],
tasks: ['htmllint', 'htmlmin', 'jshint', 'uglify', 'minjson']
}
},
htmlmin: {
dist: {
files: {
'docs/src/html/pageContainer.min.html': 'sources/structure/pageContainer.html',
'docs/src/html/sectionColumns.min.html': 'sources/structure/sectionColumns.html',
'docs/src/html/shellBar.min.html': 'sources/structure/static/shellBar.html',
'docs/src/html/footerBar.min.html': 'sources/structure/static/footerBar.html',
'docs/src/html/leftContainer.min.html': 'sources/structure/panels/leftContainer.html',
'docs/src/html/leftSidebar.min.html': 'sources/structure/panels/leftSidebar.html',
'docs/src/html/mainContainer.min.html': 'sources/structure/panels/mainContainer.html',
'docs/src/html/rightContainer.min.html': 'sources/structure/panels/rightContainer.html',
'docs/src/html/rightSidebar.min.html': 'sources/structure/panels/rightSidebar.html'
}
}
},
htmllint: {
all: ['sources/**/*.html']
},
jshint: {
files: ['*.js', '*.json', 'sources/**/*.js'],
options: {
browser: true
}
},
uglify: {
buildScript: {
src: ['sources/script/*.js'],
dest: 'docs/src/js/script.min.js'
}
},
minjson: {
build: {
files: {
'docs/src/json/ContentData.min.json': 'sources/content/ContentData.json'
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-htmlmin');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-html');
grunt.loadNpmTasks('grunt-minjson');
grunt.registerTask('default', ['htmllint', 'htmlmin', 'jshint', 'minjson', 'uglify', 'watch']);
};