diff --git a/src/cli/index.ts b/src/cli/index.ts index 3f55ce8..004744b 100755 --- a/src/cli/index.ts +++ b/src/cli/index.ts @@ -409,13 +409,15 @@ async function newApp(name?: string) { writeFileSync(join(appPath, filename), content) } + process.chdir(appPath) + await pushApp() + console.log(color.green(`✓ Created ${appName}`)) console.log() console.log('Next steps:') if (name) { console.log(` cd ${name}`) } - console.log(' toes push') console.log(' bun install') console.log(' bun dev') } diff --git a/src/shared/gitignore.ts b/src/shared/gitignore.ts index 2b288fd..142b52c 100644 --- a/src/shared/gitignore.ts +++ b/src/shared/gitignore.ts @@ -1,14 +1,19 @@ import { existsSync, readFileSync } from 'fs' import { join } from 'path' -const DEFAULT_PATTERNS = [ +const ALWAYS_EXCLUDE = [ 'node_modules', '.DS_Store', + '.git', + '*~', +] + +const DEFAULT_PATTERNS = [ + ...ALWAYS_EXCLUDE, '*.log', 'dist', 'build', '.env.local', - '.git', 'bun.lockb', ] @@ -19,7 +24,7 @@ export interface GitignoreChecker { export function loadGitignore(appPath: string): GitignoreChecker { const gitignorePath = join(appPath, '.gitignore') const patterns = existsSync(gitignorePath) - ? parseGitignore(readFileSync(gitignorePath, 'utf-8')) + ? [...ALWAYS_EXCLUDE, ...parseGitignore(readFileSync(gitignorePath, 'utf-8'))] : DEFAULT_PATTERNS return {