File tree Expand file tree Collapse file tree 11 files changed +11
-5
lines changed Expand file tree Collapse file tree 11 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ var cli = module.exports = {
33
33
}
34
34
35
35
var project = Manager . getProject ( process . cwd ( ) ) ;
36
- console . log ( 'command.abbr' , command . abbr ) ;
36
+
37
37
var command = project . commands . filter ( function ( command ) {
38
38
return command . name || command . abbr == option ;
39
39
} ) [ 0 ] ;
Original file line number Diff line number Diff line change @@ -6,9 +6,9 @@ var inquirer = require('inquirer');
6
6
var Manager = require ( '../modules/manager.js' ) ;
7
7
8
8
exports . usage = '项目初始化' ;
9
+ exports . abbr = 'i' ;
9
10
10
11
exports . setOptions = function ( ) { } ;
11
-
12
12
exports . run = function ( options ) {
13
13
Manager . reloadRC ( ) ;
14
14
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ var async = require('async');
5
5
var child_process = require ( 'child_process' ) ;
6
6
7
7
exports . usage = '代码质量检测' ;
8
+ exports . abbr = 'l' ;
8
9
9
10
exports . setOptions = function ( optimist ) {
10
11
optimist . alias ( 'd' , 'dir' ) ;
Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
3
3
exports . usage = '资源编译、打包' ;
4
+ exports . abbr = 'p' ;
4
5
5
6
exports . setOptions = function ( optimist ) {
6
7
optimist . alias ( 'l' , 'lint' ) ;
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ var request = require('request');
7
7
var semver = require ( 'semver' ) ;
8
8
9
9
exports . usage = '重载插件' ;
10
+ exports . abbr = 'r' ;
10
11
11
12
exports . setOptions = function ( optimist ) {
12
13
optimist . alias ( 's' , 'service' ) ;
Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ exports.getCommands = function () {
95
95
cwd : YKIT_COMMANDS_PATH
96
96
} ) . map ( function ( name ) {
97
97
return {
98
- name : sysPath . basename ( name , '.js' ) ,
98
+ name : sysPath . basename ( name , '.js' ) . abbr ,
99
99
abbr : require ( sysPath . join ( YKIT_COMMANDS_PATH , name ) ) . abbr ,
100
100
module : require ( sysPath . join ( YKIT_COMMANDS_PATH , name ) )
101
101
} ;
Original file line number Diff line number Diff line change @@ -6,9 +6,9 @@ const inquirer = require('inquirer');
6
6
const Manager = require ( '../modules/manager.js' ) ;
7
7
8
8
exports . usage = '项目初始化' ;
9
+ exports . abbr = 'i' ;
9
10
10
11
exports . setOptions = ( ) => { } ;
11
-
12
12
exports . run = function ( options ) {
13
13
Manager . reloadRC ( ) ;
14
14
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ const async = require('async');
5
5
const child_process = require ( 'child_process' ) ;
6
6
7
7
exports . usage = '代码质量检测' ;
8
+ exports . abbr = 'l' ;
8
9
9
10
exports . setOptions = ( optimist ) => {
10
11
optimist . alias ( 'd' , 'dir' ) ;
Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
3
3
exports . usage = '资源编译、打包' ;
4
+ exports . abbr = 'p' ;
4
5
5
6
exports . setOptions = ( optimist ) => {
6
7
optimist . alias ( 'l' , 'lint' ) ;
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ const request = require('request');
7
7
const semver = require ( 'semver' ) ;
8
8
9
9
exports . usage = '重载插件' ;
10
+ exports . abbr = 'r' ;
10
11
11
12
exports . setOptions = ( optimist ) => {
12
13
optimist . alias ( 's' , 'service' ) ;
You can’t perform that action at this time.
0 commit comments