This repository was archived by the owner on Aug 22, 2023. It is now read-only.
File tree 3 files changed +8
-5
lines changed
3 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 10
10
"debug" : " ^3.1.0" ,
11
11
"fs-extra" : " ^5.0.0" ,
12
12
"load-json-file" : " ^4.0.0" ,
13
- "lodash" : " ^4.17.4" ,
14
- "tslib" : " ^1.9.0"
13
+ "lodash" : " ^4.17.4"
15
14
},
16
15
"devDependencies" : {
17
16
"@anycli/config" : " ^1.0.3" ,
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import * as Config from '@anycli/config'
3
3
import Command from './command'
4
4
import * as flags from './flags'
5
5
export { parse } from '@anycli/parser'
6
- export { Main } from './main'
6
+ export { run , Main } from './main'
7
7
8
8
export default Command
9
9
export {
Original file line number Diff line number Diff line change @@ -5,12 +5,16 @@ import {Command} from '.'
5
5
export class Main extends Command {
6
6
static parserOptions = { '--' : false , strict : false }
7
7
8
- static run ( argv = process . argv . slice ( 2 ) , opts ?: Config . Options ) {
9
- return super . run ( argv , opts || module . parent && module . parent . parent && module . parent . parent . filename || __dirname )
8
+ static run ( argv = process . argv . slice ( 2 ) , options ?: Config . Options ) {
9
+ return super . run ( argv , options || module . parent && module . parent . parent && module . parent . parent . filename || __dirname )
10
10
}
11
11
12
12
async run ( ) {
13
13
const [ id , ...argv ] = this . argv
14
14
await this . config . runCommand ( id , argv )
15
15
}
16
16
}
17
+
18
+ export function run ( argv = process . argv . slice ( 2 ) , options ?: Config . Options ) {
19
+ return Main . run ( argv , options )
20
+ }
You can’t perform that action at this time.
0 commit comments