more gitignore
This commit is contained in:
parent
c4af302d9d
commit
3068c719cd
|
|
@ -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')
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user