-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
34 lines (30 loc) · 989 Bytes
/
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
module.exports = function(grunt){
// Load grunt tasks automatically
require('load-grunt-tasks')(grunt);
var apibType = grunt.option('type') || '';
if ( apibType === '' ) {
apibType = 'all';
// apibType = 'plugins';
}
grunt.initConfig({
exec: {
// Remove tabs
removetabs: [ 'perl', '-p', '-i', '-e', '"s/\t/ /g"', 'apiary.apib' ].join(' '),
// exec Make
makeapib: [ './_bin/MakeApib', './_lists/'+apibType, './apiary.apib' ].join(' ')
},
watch: {
scripts: {
files: ['**/*.apib'],
tasks: ['exec:makeapib','exec:removetabs'],
options: {
spawn: false,
},
},
}
});
grunt.loadNpmTasks('grunt-env');
grunt.loadNpmTasks('grunt-exec');
grunt.registerTask('default', [ 'watch' ]);
grunt.registerTask('build', ['exec:makeapib','exec:removetabs']);
};