forked from hexojs/site
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
66 lines (63 loc) · 1.55 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
module.exports = function(grunt){
grunt.initConfig({
gitclone: {
hexo: {
options: {
repository: 'https://github.com/tommy351/hexo.git',
branch: 'dev',
directory: 'tmp/hexo'
}
},
warehouse: {
options: {
repository: 'https://github.com/tommy351/warehouse.git',
branch: 'develop',
directory: 'tmp/warehouse'
}
}
},
read_pkg: {
options: {
hexo: 'tmp/hexo/package.json',
warehouse: 'tmp/warehouse/package.json'
}
},
yuidoc: {
hexo: {
name: '<%= hexo.name %>',
description: '<%= hexo.description %>',
version: '<%= hexo.version %>',
options: {
paths: 'tmp/hexo/lib',
outdir: 'tmp/hexo-out'
}
},
warehouse: {
name: '<%= warehouse.name %>',
description: '<%= warehouse.description %>',
version: '<%= warehouse.version %>',
options: {
paths: 'tmp/warehouse/lib',
outdir: 'tmp/warehouse-out'
}
}
},
copy: {
hexo: {
src: 'tmp/hexo-out/data.json',
dest: 'source/_yuidoc/index.json'
},
warehouse: {
src: 'tmp/warehouse-out/data.json',
dest: 'source/_yuidoc/warehouse.json'
},
},
clean: {
tmp: ['tmp'],
yuidoc: ['source/_yuidoc']
}
});
require('load-grunt-tasks')(grunt);
grunt.loadTasks('tasks');
grunt.registerTask('default', ['gitclone', 'read_pkg', 'yuidoc', 'copy', 'clean:tmp']);
};