This repository has been archived by the owner on Jul 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathGruntfile.js
79 lines (71 loc) · 2.48 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
module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-jade');
grunt.loadNpmTasks('grunt-contrib-stylus');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.registerTask('getContributors', 'Grabs contributor data from github', function () {
var done = this.async();
require('./scripts/get-contributors')(done);
});
grunt.registerTask('compileDocumentation', 'Compile documentation', function () {
var done = this.async();
require('./scripts/compile-documentation')(done);
});
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
connect: {
server: {
options: {
port: 9001,
base: '.'
}
}
},
jade: {
compile: {
options: {
pretty: true,
data: function (dest, srce) {
return {
coreContributors: require('./data/core-contributors.json'),
communityContributors: require('./data/community-contributors.json'),
documentation: require('./data/documentation.json')
}
}
},
files: {
"index.html": ["index.jade"],
"404.html": ["404.jade"],
"community/index.html": ["community/community.jade"],
"documentation/index.html": ["documentation/documentation.jade"],
"plugins/index.html": ["plugins/plugins.jade"],
}
}
},
stylus: {
compile: {
options: {
use: [
require('autoprefixer-stylus')
]
},
files: {
"css/main.css": ["css/main.styl"]
}
}
},
watch: {
build: {
files: ["css/**/*.styl", "**/*.jade", "documentation/*.md"],
tasks: ["build"],
options: {
livereload: true
}
}
}
});
// Default task(s).
grunt.registerTask('build', ['compileDocumentation', 'jade', 'stylus']);
grunt.registerTask('serve', ['connect', 'build', 'watch']);
grunt.registerTask('default', ['build']);
};