File tree 1 file changed +6
-3
lines changed
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -13,9 +13,11 @@ const endpointsFile = 'endpoints.yaml';
13
13
14
14
const parseCommandLineArgs = ( args ) => {
15
15
const opts = {
16
- 'string' : [ 'lang' ] ,
16
+ // @todo #24 Document --dest-dir option
17
+ 'string' : [ 'lang' , 'dest-dir' ] ,
17
18
'default' : {
18
- 'lang' : 'js'
19
+ 'lang' : 'js' ,
20
+ 'dest-dir' : '.'
19
21
}
20
22
} ;
21
23
const argv = parseArgs ( args , opts ) ;
@@ -268,6 +270,7 @@ const createDependenciesDescriptor = async (destDir, lang) => {
268
270
console . log ( 'Generate' , fileName ) ;
269
271
270
272
const resultFile = path . join ( destDir , fileName ) ;
273
+ // @todo #24 [js] Possibly incorrect project name with --dest-dir option
271
274
const projectName = path . basename ( destDir ) ;
272
275
console . log ( 'Project name:' , projectName ) ;
273
276
@@ -308,7 +311,7 @@ afteward to run`)
308
311
} ;
309
312
310
313
const absolutePathToDestDir = ( argv ) => {
311
- const relativeDestDir = argv . _ . length > 0 ? argv . _ [ 0 ] : '.'
314
+ const relativeDestDir = argv . _ . length > 0 ? argv . _ [ 0 ] : argv [ 'dest-dir' ]
312
315
return path . resolve ( process . cwd ( ) , relativeDestDir )
313
316
}
314
317
You can’t perform that action at this time.
0 commit comments