File tree Expand file tree Collapse file tree 3 files changed +18
-1
lines changed
Expand file tree Collapse file tree 3 files changed +18
-1
lines changed Original file line number Diff line number Diff line change 1+ {
2+ "clean" : true ,
3+ "file" : " ./examples/openApiFiles/passportescaperoom.com.json" ,
4+ "outputFolder" : " ./examples/generated/angular2" ,
5+ "template" : " angular2" ,
6+ "saveFile" : " ./openApiFiles/passportescaperoom.com"
7+ }
Original file line number Diff line number Diff line change 2727 "start:webpack" : " npx webpack --watch" ,
2828 "build" : " tsc" ,
2929 "build:webpack" : " npx webpack --mode production" ,
30- "generate:examples" : " npm start -- -f examples/openApiFiles/passportescaperoom.com.json -o examples/generated/angular2 -t angular2 " ,
30+ "generate:examples" : " npm start -- --config-file ./ examples/transform-config.json " ,
3131 "test" : " echo \" Error: no test specified\" && exit 1"
3232 },
3333 "license" : " ISC" ,
Original file line number Diff line number Diff line change 11import * as yargs from 'yargs' ;
2+ import { readFileSync } from 'fs' ;
23
34export const argumentsInstance = yargs
45 . alias ( 'version' , 'v' )
@@ -9,6 +10,15 @@ export const argumentsInstance = yargs
910 'Convert a Swagger JSON file to compatible-angular API' ,
1011 )
1112
13+ . config ( 'config-file' , ( configPath ) => {
14+ return JSON . parse ( readFileSync ( configPath , 'utf-8' ) ) ;
15+ } )
16+ . describe (
17+ 'config-file' ,
18+ 'Configuration file to use (values from cli will overwrite the files one).' ,
19+ )
20+ . default ( 'save-file' , './openapi_temp' )
21+
1222 . nargs ( 'save-file' , 1 )
1323 . alias ( 's' , 'save-file' )
1424 . describe (
You can’t perform that action at this time.
0 commit comments