File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -20,8 +20,10 @@ const loadConfig = (endpointsFile) => {
2020 }
2121} ;
2222
23- const createEndpoints = ( config , resultFile ) => {
24- console . log ( 'Generate' , resultFile ) ;
23+ const createEndpoints = ( destDir , fileName , config ) => {
24+ console . log ( 'Generate' , fileName ) ;
25+ const resultFile = path . join ( destDir , fileName ) ;
26+
2527 for ( let endpoint of config ) {
2628 console . log ( 'GET' , endpoint . path , '=>' , endpoint . get ) ;
2729 }
@@ -64,9 +66,10 @@ const createPackageJson = (destDir, fileName) => {
6466} ;
6567
6668const config = loadConfig ( endpointsFile ) ;
67- createEndpoints ( config , resultFile ) ;
6869
6970const destDir = process . cwd ( ) ;
71+ createEndpoints ( destDir , resultFile , config ) ;
72+
7073createPackageJson ( destDir , 'package.json' ) ;
7174
7275console . info ( 'The application has been generated!\nUse\n npm install\nto install its dependencies and\n npm start\nafteward to run it' ) ;
You can’t perform that action at this time.
0 commit comments