more gitignore

This commit is contained in:
Chris Wanstrath 2026-01-29 23:29:47 -08:00
parent c4af302d9d
commit 3068c719cd
2 changed files with 11 additions and 4 deletions

View File

@ -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')
}

View File

@ -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 {