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)
|
writeFileSync(join(appPath, filename), content)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
process.chdir(appPath)
|
||||||
|
await pushApp()
|
||||||
|
|
||||||
console.log(color.green(`✓ Created ${appName}`))
|
console.log(color.green(`✓ Created ${appName}`))
|
||||||
console.log()
|
console.log()
|
||||||
console.log('Next steps:')
|
console.log('Next steps:')
|
||||||
if (name) {
|
if (name) {
|
||||||
console.log(` cd ${name}`)
|
console.log(` cd ${name}`)
|
||||||
}
|
}
|
||||||
console.log(' toes push')
|
|
||||||
console.log(' bun install')
|
console.log(' bun install')
|
||||||
console.log(' bun dev')
|
console.log(' bun dev')
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,19 @@
|
||||||
import { existsSync, readFileSync } from 'fs'
|
import { existsSync, readFileSync } from 'fs'
|
||||||
import { join } from 'path'
|
import { join } from 'path'
|
||||||
|
|
||||||
const DEFAULT_PATTERNS = [
|
const ALWAYS_EXCLUDE = [
|
||||||
'node_modules',
|
'node_modules',
|
||||||
'.DS_Store',
|
'.DS_Store',
|
||||||
|
'.git',
|
||||||
|
'*~',
|
||||||
|
]
|
||||||
|
|
||||||
|
const DEFAULT_PATTERNS = [
|
||||||
|
...ALWAYS_EXCLUDE,
|
||||||
'*.log',
|
'*.log',
|
||||||
'dist',
|
'dist',
|
||||||
'build',
|
'build',
|
||||||
'.env.local',
|
'.env.local',
|
||||||
'.git',
|
|
||||||
'bun.lockb',
|
'bun.lockb',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
@ -19,7 +24,7 @@ export interface GitignoreChecker {
|
||||||
export function loadGitignore(appPath: string): GitignoreChecker {
|
export function loadGitignore(appPath: string): GitignoreChecker {
|
||||||
const gitignorePath = join(appPath, '.gitignore')
|
const gitignorePath = join(appPath, '.gitignore')
|
||||||
const patterns = existsSync(gitignorePath)
|
const patterns = existsSync(gitignorePath)
|
||||||
? parseGitignore(readFileSync(gitignorePath, 'utf-8'))
|
? [...ALWAYS_EXCLUDE, ...parseGitignore(readFileSync(gitignorePath, 'utf-8'))]
|
||||||
: DEFAULT_PATTERNS
|
: DEFAULT_PATTERNS
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user