File tree Expand file tree Collapse file tree 5 files changed +12
-5
lines changed Expand file tree Collapse file tree 5 files changed +12
-5
lines changed Original file line number Diff line number Diff line change 3
3
[ ![ Build Status] ( https://travis-ci.org/tomyitav/generate-graphql-app.svg?branch=master )] ( https://travis-ci.org/tomyitav/generate-graphql-app )
4
4
[ ![ npm] ( https://img.shields.io/npm/v/generate-graphql-app.svg )] ( https://www.npmjs.com/package/generate-graphql-app )
5
5
[ ![ MIT licensed] ( https://img.shields.io/badge/license-MIT-blue.svg )] ( ./LICENSE )
6
+ [ ![ code style: prettier] ( https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square )] ( https://github.com/prettier/prettier )
6
7
7
8
Cli tool for bootstrapping production grade GraphQL server, using:
8
9
Original file line number Diff line number Diff line change 1
1
export abstract class AbstractCommand {
2
- public abstract getName ( ) : string ;
3
- public abstract getDescription ( ) : string ;
4
- public abstract getAction ( ) : ( ...args : any [ ] ) => void ;
2
+ public abstract getName ( ) : string
3
+ public abstract getDescription ( ) : string
4
+ public abstract getAlias ( ) : string
5
+ public abstract getAction ( ) : ( ...args : any [ ] ) => void
5
6
}
Original file line number Diff line number Diff line change @@ -20,6 +20,10 @@ export class Init extends AbstractCommand {
20
20
return 'Create new project'
21
21
}
22
22
23
+ public getAlias ( ) : string {
24
+ return 'i'
25
+ }
26
+
23
27
public getAction ( ) : ( ...args : any [ ] ) => void {
24
28
return async ( projectName : string ) => {
25
29
try {
Original file line number Diff line number Diff line change 3
3
import * as program from 'commander'
4
4
import allCommands from './commands/all-commands'
5
5
6
- program . version ( '1.2.2 ' ) . description ( 'Cli tool for bootstrapping production grade GraphQL server' )
6
+ program . version ( '1.2.3 ' ) . description ( 'Cli tool for bootstrapping production grade GraphQL server' )
7
7
8
8
for ( let command of allCommands ) {
9
9
program
10
10
. command ( command . getName ( ) )
11
11
. description ( command . getDescription ( ) )
12
+ . alias ( command . getAlias ( ) )
12
13
. action ( command . getAction ( ) )
13
14
}
14
15
You can’t perform that action at this time.
0 commit comments