default .gitignore for templates
This commit is contained in:
parent
65e19d27e2
commit
fabdd084cb
|
|
@ -15,6 +15,7 @@ interface TemplateVars {
|
|||
APP_NAME: string
|
||||
}
|
||||
|
||||
const SHARED_FILES = ['.gitignore', '.npmrc', 'package.json', 'tsconfig.json']
|
||||
const TEMPLATES_DIR = join(import.meta.dir, '../../templates')
|
||||
|
||||
function readDir(dir: string): string[] {
|
||||
|
|
@ -45,7 +46,7 @@ export function generateTemplates(appName: string, template: TemplateType = 'ssr
|
|||
const result: AppTemplates = {}
|
||||
|
||||
// Read shared files from templates/
|
||||
for (const filename of ['.npmrc', 'package.json', 'tsconfig.json']) {
|
||||
for (const filename of SHARED_FILES) {
|
||||
const path = join(TEMPLATES_DIR, filename)
|
||||
let content = readFileSync(path, 'utf-8')
|
||||
content = replaceVars(content, vars)
|
||||
|
|
|
|||
39
templates/.gitignore
vendored
Normal file
39
templates/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
# dependencies (bun install)
|
||||
node_modules
|
||||
|
||||
# dev data
|
||||
data/
|
||||
|
||||
# honk honk
|
||||
.claude/settings.local.json
|
||||
|
||||
# output
|
||||
dist/
|
||||
*.tgz
|
||||
|
||||
# code coverage
|
||||
coverage
|
||||
*.lcov
|
||||
|
||||
# logs
|
||||
logs
|
||||
_.log
|
||||
report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
|
||||
|
||||
# dotenv environment variable files
|
||||
.env
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
.env.local
|
||||
|
||||
# caches
|
||||
.eslintcache
|
||||
.cache
|
||||
*.tsbuildinfo
|
||||
|
||||
# IntelliJ based IDEs
|
||||
.idea
|
||||
|
||||
# Finder (MacOS) folder config
|
||||
.DS_Store
|
||||
Loading…
Reference in New Issue
Block a user