11const fsExtras = require ( "fs-extra" ) ;
2- import path from "path"
2+ import path from "path" ;
33
44// import interactiveMode from "../../utils/interactiveMode";
55// import {
@@ -9,7 +9,8 @@ import path from "path"
99// } from "../../utils/dockerUtility";
1010// import checkPrerequisite from "../../utils/checkPrerequisite";
1111import {
12- installDependencies , installPackage ,
12+ installDependencies ,
13+ installPackage ,
1314 validateAndCreateProjectDirectory ,
1415} from "../../utils/index" ;
1516import { copyingLocalTemplate } from "../../utils" ;
@@ -77,30 +78,31 @@ export default async function create(
7778 const gitFilePath = path . join ( process . cwd ( ) , projectName , ".git" ) ;
7879 fsExtras . removeSync ( gitFilePath ) ;
7980
80-
81-
82- if ( options . fromExample === 'mongo-as-prisma' ) {
83- await installPackage ( projectDirPath , '@godspeedsystems/plugins-prisma-as-datastore' )
84- }
81+ if ( options . fromExample === "mongo-as-prisma" ) {
82+ await installPackage (
83+ projectDirPath ,
84+ "@godspeedsystems/plugins-prisma-as-datastore"
85+ ) ;
86+ }
8587 await installDependencies ( projectDirPath , projectName ) ;
8688
89+ // Delete .template folder in project folder.
90+ const templateFilePath = path . join ( process . cwd ( ) , projectName , ".template" ) ;
91+
92+ if ( fsExtras . existsSync ( templateFilePath ) ) {
93+ fsExtras . removeSync ( templateFilePath ) ;
94+ }
8795
8896 try {
8997 // the NEW flow [without containers]
90-
91-
9298 // const composeOptions = await getComposeOptions();
93-
9499 // if (composeOptions.composeOptions) {
95100 // composeOptions.composeOptions.push(`${projectName}_devcontainer`);
96101 // }
97-
98102 // composeOptions.cwd = path.resolve(projectDirPath, ".devcontainer");
99103 // composeOptions.log = process.env.DEBUG ? Boolean(process.env.DEBUG) : false;
100-
101104 // // check if there are already running resources
102105 // await prepareToStartContainers(projectName, composeOptions);
103-
104106 // await buildContainers(
105107 // projectName,
106108 // godspeedOptions,
0 commit comments