Skip to content

Commit 9ae3852

Browse files
committed
fix: if http-api selected, copy example-project-folder completely instead of creating everything manually
1 parent 739cd5c commit 9ae3852

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/lib/answerHandlers/createNewProjectFiles.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,14 @@ export class CreateNewProjectFiles {
5757
if (!fs.existsSync(this.path)) {
5858
fs.mkdirSync(this.path);
5959
}
60+
if (this.answers['project-type'] === 'http-api@express-utils') {
61+
fs.cpSync(path.join(this.staticPath, 'example_src', 'express-utils-template'), path.join(this.path), {
62+
recursive: true,
63+
});
64+
return;
65+
}
6066
//only add if Dockerfile option was selected
61-
if (this.answers['project-dockerfile-enabled'] && this.answers["project-type"] !== "http-api@express-utils") {
67+
if (this.answers['project-dockerfile-enabled']) {
6268
this.addDocker();
6369
}
6470
//eslint / prettier

0 commit comments

Comments
 (0)