-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathGruntfile.js
More file actions
60 lines (56 loc) · 1.65 KB
/
Gruntfile.js
File metadata and controls
60 lines (56 loc) · 1.65 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
module.exports = function(grunt) {
grunt.initConfig({
clean: {
bundle: ['assets/sections.js'],
html: ['_sections/**/*.html']
},
ngtemplates: {
docs: {
src: 'showcase/**/*.md',
dest: 'assets/sections.js',
options: {
standalone: true,
module: 'cafapi.templates'
}
}
},
watch: {
controllers: {
files: ['showcase/**/*.md'],
tasks: ['clean:bundle', 'ngtemplates', 'clean:html'],
options: {
spawn: true,
interrupt: true
},
},
},
jekyll: {
serve: {
options: {
serve: true,
incremental: true,
watch: false,
baseurl: '/cafapi',
config: '_config.yml',
open_url: true,
bundleExec: true
}
}
},
concurrent: {
watch: {
tasks: ['jekyll', 'watch'],
options: {
logConcurrentOutput: true
}
}
}
});
grunt.loadNpmTasks('grunt-angular-templates');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-concurrent');
grunt.loadNpmTasks('grunt-jekyll');
// Default task.
grunt.registerTask('default', ['clean:bundle', 'ngtemplates', 'clean:html', 'concurrent:watch']);
};