-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGruntFile.js
More file actions
103 lines (97 loc) · 2.97 KB
/
GruntFile.js
File metadata and controls
103 lines (97 loc) · 2.97 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
'use strict';
module.exports = function (grunt) {
// Load grunt tasks automatically
require('load-grunt-tasks')(grunt);
grunt.initConfig({
concat: {
js: {
options: {
banner:
'angular.module(\'datetime.bootstrap\', [\'datetime.bootstrap.directives\',' +
'\'datetime.bootstrap.services\',' +
'\'datetime.bootstrap.templates\']);\n\n'
},
src: ['./src/scripts/*.js'],
dest: './dist/datetime-bootstrap.js'
},
css: {
src: ['./src/styles/*.css'],
dest: './dist/datetime-bootstrap.css'
}
},
htmlangular: {
options: {
customtags: [
'date-input',
'time-input',
'numeric-dropdown'
],
customattrs: [
'dropdown',
'dropdown-toggle',
'is-open',
'padded-numeric'
]
},
files: {
src: ['src/templates/*.html'],
}
},
html2js: {
app: {
options: {
base: './src/templates/',
useStrict: true,
quoteChar: '\'',
htmlmin: {
collapseBooleanAttributes: true,
collapseWhitespace: true,
removeAttributeQuotes: true,
removeComments: true,
removeEmptyAttributes: true,
removeRedundantAttributes: true,
removeScriptTypeAttributes: true,
removeStyleLinkTypeAttributes: true
}
},
src: ['./src/templates/*.html'],
dest: './src/scripts/templates.js',
module: 'datetime.bootstrap.templates'
}
},
uglify: {
js: {
src: ['./dist/datetime-bootstrap.js'],
dest: './dist/datetime-bootstrap.min.js'
}
},
cssmin: {
target: {
files: {
'./dist/datetime-bootstrap.min.css': ['./dist/datetime-bootstrap.css']
}
}
},
watch: {
files: [
'./src/templates/*.html',
'./src/scripts/*.js',
'./src/styles/*.css'
],
tasks: 'quick'
}
});
grunt.registerTask('default', [
'htmlangular',
'html2js',
'concat',
'uglify',
'cssmin'
]);
grunt.registerTask('quick', [
'html2js',
'concat',
'uglify',
'cssmin'
]) ;
};