-
Notifications
You must be signed in to change notification settings - Fork 1
/
gruntfile.js
86 lines (77 loc) · 2 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
module.exports = function(grunt){
require("matchdep").filterDev("grunt-*").forEach(grunt.loadNpmTasks);
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
mustache_render: {
options: {
// Task global options go here
},
your_target: {
options: {
// Target specific options go here
},
files : [
{
data: "assets/icons-4-7-0.json",
template: "index.mustache",
dest: "index.html"
}
]
},
},
htmlhint: {
build: {
options: {
'tag-pair': true,
'tagname-lowercase': true,
'attr-lowercase': true,
'attr-value-double-quotes': true,
'doctype-first': true,
'spec-char-escape': true,
'id-unique': true,
'head-script-disabled': true,
'style-disabled': true
},
src: ['*.html']
}
},
uglify: {
build: {
files: {
'build/js/fa-cheatsheet.min.js': ['assets/js/*.js']
}
}
},
cssmin: {
target: {
files: [{
expand: true,
cwd: 'assets/css',
src: ['*.css', '!*.min.css'],
dest: 'build/css',
ext: '.min.css'
}]
}
},
watch: {
mustache: {
files: ['*.mustache'],
tasks: ['mustache_render']
},
html: {
files: ['*.html'],
tasks: ['htmlhint']
},
js: {
files: ['assets/js/*.js'],
tasks: ['uglify']
},
css: {
files: ['assets/css/*.css'],
tasks: ['cssmin']
}
}
});
grunt.loadNpmTasks('grunt-mustache-render');
grunt.registerTask('default', []);
};