From 7fe6e2bd235d05a72a306dc71533fcccef737694 Mon Sep 17 00:00:00 2001 From: Daniel Rochetti Date: Wed, 21 Feb 2024 20:10:05 -0800 Subject: [PATCH] fix(create-app): init new repo on create --- libs/create-app/package.json | 2 +- libs/create-app/src/index.ts | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/libs/create-app/package.json b/libs/create-app/package.json index 13e2ec1..c387c61 100644 --- a/libs/create-app/package.json +++ b/libs/create-app/package.json @@ -1,6 +1,6 @@ { "name": "@fal-ai/create-app", - "version": "0.1.3", + "version": "0.1.4", "description": "The fal app generator.", "type": "module", "license": "MIT", diff --git a/libs/create-app/src/index.ts b/libs/create-app/src/index.ts index 74a6de3..481af96 100644 --- a/libs/create-app/src/index.ts +++ b/libs/create-app/src/index.ts @@ -87,6 +87,9 @@ async function main() { fs.writeFileSync(`${appName}/.env.local`, envs); process.chdir(path.join(process.cwd(), appName)); + await execa('rm', ['-rf', '.git']); + await execa('git', ['init']); + spinner.text = ''; let startCommand = ''; @@ -107,6 +110,9 @@ async function main() { } spinner.stop(); + await execa('git', ['add', '.']); + await execa('git', ['commit', '-m', 'Initial commit']); + process.chdir('../'); log( `${green.bold('Success!')} Created ${purple.bold(