File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ const path = require('path');
8
8
const parseArgs = require ( 'minimist' ) ;
9
9
10
10
const endpointsFile = 'endpoints.yaml' ;
11
- const appFile = 'app.js' ;
12
11
const routesFile = 'routes.js' ;
13
12
14
13
const parseCommandLineArgs = ( args ) => {
@@ -36,7 +35,8 @@ const loadConfig = (endpointsFile) => {
36
35
}
37
36
} ;
38
37
39
- const createApp = async ( destDir , fileName ) => {
38
+ const createApp = async ( destDir , lang ) => {
39
+ const fileName = `app.${ lang } `
40
40
console . log ( 'Generate' , fileName ) ;
41
41
const resultFile = path . join ( destDir , fileName ) ;
42
42
@@ -136,7 +136,7 @@ if (!fs.existsSync(destDir)) {
136
136
}
137
137
138
138
if ( argv . lang === 'js' ) {
139
- createApp ( destDir , appFile , config ) ;
139
+ createApp ( destDir , argv . lang , config ) ;
140
140
createEndpoints ( destDir , routesFile , config ) ;
141
141
createPackageJson ( destDir , 'package.json' ) ;
142
142
}
You can’t perform that action at this time.
0 commit comments