UNPKG

938 BJavaScriptView Raw
1class Test{
2 constructor(name,options){
3 const _ts = this;
4
5 //自定义模块
6 _ts.m = {
7 path:require('path'),
8 getImgInfo:require('../lib/getImgInfo')
9 };
10
11 _ts.name = name;
12 _ts.option = options;
13 }
14
15 init(){
16 const _ts = this,
17 m = _ts.m;
18
19 let data = {};
20
21
22 }
23}
24
25module.exports = {
26 regTask:{
27 command:'[name]',
28 description:'这是一个测试任务。(任务描述)',
29 option:[
30 //['-p, --param [type]','任务参数(可选)']
31 ['-p, --param <type>','任务参数(必选)']
32 ],
33 help:()=>{
34 console.log('');
35 console.log(' 补充说明:');
36 console.log(' ------------------------------------------------------------');
37 console.log(' 暂无');
38 },
39 action:Test
40 },
41 fun:()=>{}
42};
\No newline at end of file