-
Notifications
You must be signed in to change notification settings - Fork 301
/
Gruntfile.js
122 lines (122 loc) · 2.81 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
// Generated by CoffeeScript 1.6.3
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
jade: {
dev: {
options: {
pretty: true
},
files: {
'temp/_template.html': 'src/abn_tree_template.jade',
'test/tests_page.html': 'test/tests_page.jade'
}
},
bs2_ng115_test_page: {
files: {
'test/bs2_ng115_test_page.html': 'test/test_page.jade'
},
options: {
pretty: true,
data: {
bs: "2",
ng: "1.1.5"
}
}
},
bs3_ng115_test_page: {
files: {
'test/bs3_ng115_test_page.html': 'test/test_page.jade'
},
options: {
pretty: true,
data: {
bs: "3",
ng: "1.1.5"
}
}
},
bs2_ng120_test_page: {
files: {
'test/bs2_ng120_test_page.html': 'test/test_page.jade'
},
options: {
pretty: true,
data: {
bs: "2",
ng: "1.2.12"
}
}
},
bs3_ng120_test_page: {
files: {
'test/bs3_ng120_test_page.html': 'test/test_page.jade'
},
options: {
pretty: true,
data: {
bs: "3",
ng: "1.2.12"
}
}
}
},
"string-replace": {
dev: {
files: {
'temp/_directive.coffee': 'src/abn_tree_directive.coffee'
},
options: {
replacements: [
{
pattern: "{html}",
replacement_old: "<h1>i am the replacement!</h1>",
replacement: function(match, p1, offset, string) {
return grunt.file.read('temp/_template.html');
}
}
]
}
}
},
coffee: {
dev: {
options: {
bare: false
},
files: {
'dist/abn_tree_directive.js': 'temp/_directive.coffee',
'test/test_page.js': 'test/test_page.coffee'
}
}
},
watch: {
jade: {
files: ['**/*.jade'],
tasks: ['jade', 'string-replace'],
options: {
livereload: true
}
},
css: {
files: ['**/*.css'],
tasks: [],
options: {
livereload: true
}
},
coffee: {
files: ['**/*.coffee'],
tasks: ['jade', 'string-replace', 'coffee'],
options: {
livereload: true
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-jade');
grunt.loadNpmTasks('grunt-contrib-coffee');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-string-replace');
return grunt.registerTask('default', ['jade', 'string-replace', 'coffee', 'watch']);
};