diff --git a/libs/create-qwikdev-astro/package.json b/libs/create-qwikdev-astro/package.json index e2f9741c..d5576d10 100644 --- a/libs/create-qwikdev-astro/package.json +++ b/libs/create-qwikdev-astro/package.json @@ -86,10 +86,7 @@ }, "./package.json": "./package.json" }, - "files": [ - "dist", - "stubs" - ], + "files": ["dist", "stubs"], "bin": "./dist/cli.js", "keywords": [ "astro-integration", diff --git a/libs/create-qwikdev-astro/src/app.ts b/libs/create-qwikdev-astro/src/app.ts index fbe50f05..dcf3f864 100644 --- a/libs/create-qwikdev-astro/src/app.ts +++ b/libs/create-qwikdev-astro/src/app.ts @@ -337,6 +337,7 @@ export class Application extends Program { this.step(`Creating new project in ${this.bgBlue(` ${outDir} `)} ... 🐇`); this.copyTemplate(input, templatePath); + this.copyGitignore(input); } async start(input: Input): Promise { @@ -471,6 +472,16 @@ export class Application extends Program { } } + copyGitignore(input: Input) { + this.step("Copying `.gitignore` file..."); + + if (!input.dryRun) { + const gitignore = path.join(__dirname, "..", "stubs", "gitignore"); + const dotGitignore = path.join(input.outDir, ".gitignore"); + cpSync(gitignore, dotGitignore, { force: true }); + } + } + copyTemplate(input: Input, templatePath: string): void { if (!input.dryRun) { const outDir = input.outDir; diff --git a/libs/create-qwikdev-astro/stubs/templates/deno-biome/.gitignore b/libs/create-qwikdev-astro/stubs/gitignore similarity index 100% rename from libs/create-qwikdev-astro/stubs/templates/deno-biome/.gitignore rename to libs/create-qwikdev-astro/stubs/gitignore diff --git a/libs/create-qwikdev-astro/stubs/templates/deno/.gitignore b/libs/create-qwikdev-astro/stubs/templates/deno/.gitignore deleted file mode 100644 index 6d4c0aa0..00000000 --- a/libs/create-qwikdev-astro/stubs/templates/deno/.gitignore +++ /dev/null @@ -1,21 +0,0 @@ -# build output -dist/ - -# generated types -.astro/ - -# dependencies -node_modules/ - -# logs -npm-debug.log* -yarn-debug.log* -yarn-error.log* -pnpm-debug.log* - -# environment variables -.env -.env.production - -# macOS-specific files -.DS_Store diff --git a/libs/create-qwikdev-astro/stubs/templates/node-biome/.gitignore b/libs/create-qwikdev-astro/stubs/templates/node-biome/.gitignore deleted file mode 100644 index 6d4c0aa0..00000000 --- a/libs/create-qwikdev-astro/stubs/templates/node-biome/.gitignore +++ /dev/null @@ -1,21 +0,0 @@ -# build output -dist/ - -# generated types -.astro/ - -# dependencies -node_modules/ - -# logs -npm-debug.log* -yarn-debug.log* -yarn-error.log* -pnpm-debug.log* - -# environment variables -.env -.env.production - -# macOS-specific files -.DS_Store diff --git a/libs/create-qwikdev-astro/stubs/templates/node/.gitignore b/libs/create-qwikdev-astro/stubs/templates/node/.gitignore deleted file mode 100644 index 6d4c0aa0..00000000 --- a/libs/create-qwikdev-astro/stubs/templates/node/.gitignore +++ /dev/null @@ -1,21 +0,0 @@ -# build output -dist/ - -# generated types -.astro/ - -# dependencies -node_modules/ - -# logs -npm-debug.log* -yarn-debug.log* -yarn-error.log* -pnpm-debug.log* - -# environment variables -.env -.env.production - -# macOS-specific files -.DS_Store diff --git a/libs/create-qwikdev-astro/stubs/templates/none-biome/.gitignore b/libs/create-qwikdev-astro/stubs/templates/none-biome/.gitignore deleted file mode 100644 index 6d4c0aa0..00000000 --- a/libs/create-qwikdev-astro/stubs/templates/none-biome/.gitignore +++ /dev/null @@ -1,21 +0,0 @@ -# build output -dist/ - -# generated types -.astro/ - -# dependencies -node_modules/ - -# logs -npm-debug.log* -yarn-debug.log* -yarn-error.log* -pnpm-debug.log* - -# environment variables -.env -.env.production - -# macOS-specific files -.DS_Store diff --git a/libs/create-qwikdev-astro/stubs/templates/none/.gitignore b/libs/create-qwikdev-astro/stubs/templates/none/.gitignore deleted file mode 100644 index 6d4c0aa0..00000000 --- a/libs/create-qwikdev-astro/stubs/templates/none/.gitignore +++ /dev/null @@ -1,21 +0,0 @@ -# build output -dist/ - -# generated types -.astro/ - -# dependencies -node_modules/ - -# logs -npm-debug.log* -yarn-debug.log* -yarn-error.log* -pnpm-debug.log* - -# environment variables -.env -.env.production - -# macOS-specific files -.DS_Store diff --git a/libs/qwikdev-astro/package.json b/libs/qwikdev-astro/package.json index 23037b98..5f55c69e 100644 --- a/libs/qwikdev-astro/package.json +++ b/libs/qwikdev-astro/package.json @@ -40,12 +40,7 @@ "./utils": "./src/utils.ts", "./q-astro-manifest.json": "./q-astro-manifest.json" }, - "files": [ - "src", - "src/index.ts", - "server.ts", - "env.d.ts" - ], + "files": ["src", "src/index.ts", "server.ts", "env.d.ts"], "keywords": [ "astro-integration", "astro-component",