Skip to content

Commit aeae889

Browse files
author
User
committed
added Options/Data APIs
1 parent 7f11327 commit aeae889

File tree

5 files changed

+73
-2
lines changed

5 files changed

+73
-2
lines changed

API.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
const G_C = require('./apis/globalconfig')
22
const G_API = require('./apis/globalapi')
3+
const O_D = require('./apis/optionsdata')
34

45
const GlobalConfig = [
56
G_C.SILENT,
@@ -27,6 +28,15 @@ const GlobalAPI = [
2728
G_API.VERSION
2829
]
2930

31+
const OptionsData = [
32+
O_D.DATA,
33+
O_D.PROPS,
34+
O_D.PROPS_DATA,
35+
O_D.COMPUTED,
36+
O_D.METHODS,
37+
O_D.WATCH
38+
]
39+
3040

3141
module.exports = {
3242
GlobalConfig,

apis/globalapi.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ const FILTER = {
125125

126126
}
127127

128-
// untested
129128
const COMPONENT = {
130129
category: 'Global API',
131130
name: 'Vue.component(id,[definition]',

apis/optionsdata.js

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
const chalk = require('chalk')
2+
const custom = require('../customcolors')
3+
const colorComment = custom.colorComment
4+
const colorPrimitive = custom.colorPrimitive
5+
const colorError = custom.colorError
6+
const colorArgs = custom.colorArgs
7+
8+
9+
10+
const DATA = {
11+
12+
}
13+
14+
const PROPS = {
15+
16+
}
17+
18+
const PROPS_DATA = {
19+
20+
}
21+
22+
const COMPUTED = {
23+
24+
}
25+
26+
const METHODS = {
27+
28+
}
29+
30+
const WATCH = {
31+
32+
}
33+
34+
35+
module.exports = {
36+
DATA,
37+
PROPS,
38+
PROPS_DATA,
39+
COMPUTED,
40+
METHODS,
41+
WATCH
42+
}

logfunctions/logoptions.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
const chalk = require('chalk')
2+
const custom = require('../customcolors')
3+
const args = custom.colorArgs
4+
module.exports = {
5+
logOption: function(obj){
6+
return(
7+
`
8+
${chalk.green('Category:')} ${obj.category}
9+
${chalk.green('Name:')} ${obj.name + '\n'}
10+
* Type: ${args(obj.type)}
11+
${obj.restrictions ? `* Restrictions: ${obj.restrictions}` : ''}
12+
* Details ${obj.details}
13+
${obj.example ? `* Example: ${obj.example}` : ''}
14+
`
15+
)
16+
}
17+
}

vue-help.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,4 +129,7 @@ V.command('version', 'Global API: #Vue.version').action(function(args, callback)
129129
const v = ga[10]
130130
this.log(LGA.logGlobalAPI(v))
131131
callback()
132-
})
132+
})
133+
134+
// Options/Data
135+

0 commit comments

Comments
 (0)