-
Notifications
You must be signed in to change notification settings - Fork 11
/
Gruntfile.cjs
58 lines (56 loc) · 1.2 KB
/
Gruntfile.cjs
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
/*global module:false*/
module.exports = function (grunt) {
// Project configuration.
grunt.initConfig({
peg: {
parser: {
src: 'src/parser/parser.peg',
dest: 'src/parser/parser.js',
options: {
wrapper: function (src, parser) {
return 'export default ' + parser + ';'
},
},
},
parserExt: {
src: 'src/parser/parserExt.peg',
dest: 'src/parser/parserExt.js',
options: {
wrapper: function (src, parser) {
return 'export default ' + parser + ';'
},
},
},
},
concat: {
jsdoc2md: {
src: [
'dist/View.js',
'dist/SubView.js',
'dist/VisualFormat.js',
'dist/Attribute.js',
'dist/Relation.js',
'dist/Priority.js',
],
dest: 'tmp/concat.js',
},
},
jsdoc2md: {
output: {
options: {
'global-index-format': 'none',
'module-index-format': 'none',
},
src: 'tmp/concat.js',
dest: 'docs/AutoLayout.md',
},
},
})
// These plugins provide necessary tasks.
grunt.loadNpmTasks('grunt-jsdoc-to-markdown')
grunt.loadNpmTasks('grunt-peg')
grunt.loadNpmTasks('grunt-contrib-concat')
// Tasks
grunt.registerTask('doc', ['concat', 'jsdoc2md'])
grunt.registerTask('parser', ['peg'])
}