A system for building static webapps
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: issue where gitignore isn't copied

+13 -8
+1 -1
deno.json
··· 34 34 "semiColons": false 35 35 }, 36 36 "lint": { 37 - "exclude": ["dist"], 37 + "exclude": ["**/dist"], 38 38 "rules": { 39 39 "exclude": ["no-import-prefix", "verbatim-module-syntax"] 40 40 }
+1
packages/cli/.gitignore
··· 1 + dist
+10 -6
packages/cli/commands/init.ts
··· 23 23 // Must be updated when stub files are added or removed. 24 24 const STUB_FILES: Record<ProjectType, string[]> = { 25 25 pwa: [ 26 - '.gitignore', 26 + '_gitignore', 27 27 'civility.json', 28 28 'deno.json', 29 29 'deno.lock', ··· 47 47 'www/worker.ts', 48 48 ], 49 49 blog: [ 50 - '.gitignore', 50 + '_gitignore', 51 51 'civility.json', 52 52 'deno.json', 53 53 'README.md', ··· 56 56 'www/template.html', 57 57 ], 58 58 docs: [ 59 - '.gitignore', 59 + '_gitignore', 60 60 'civility.json', 61 61 'deno.json', 62 62 'README.md', ··· 65 65 'template.html', 66 66 ], 67 67 extension: [ 68 - '.gitignore', 68 + '_gitignore', 69 69 'civility.json', 70 70 'deno.json', 71 71 'README.md', ··· 151 151 152 152 for (const relPath of files) { 153 153 const sourceUrl = new URL(relPath, stubBaseUrl) 154 - const targetPath = join(targetDir, relPath) 154 + const destPath = relPath.replace( 155 + /(?:^|\/)_gitignore$/, 156 + (m) => m.replace('_gitignore', '.gitignore'), 157 + ) 158 + const targetPath = join(targetDir, destPath) 155 159 156 160 let bytes: Uint8Array 157 161 try { ··· 169 173 await ensureDir(dirname(targetPath)) 170 174 await Deno.writeFile(targetPath, bytes) 171 175 172 - if (shouldProcessAsText(relPath)) textFiles.push(targetPath) 176 + if (shouldProcessAsText(destPath)) textFiles.push(targetPath) 173 177 } 174 178 175 179 for (const filePath of textFiles) {
+1 -1
packages/cli/deno.json
··· 1 1 { 2 2 "name": "@civility/cli", 3 - "version": "0.2.2", 3 + "version": "0.2.3", 4 4 "exports": { 5 5 ".": "./main.ts" 6 6 },
packages/cli/stubs/blog/.gitignore packages/cli/stubs/blog/_gitignore
packages/cli/stubs/docs/.gitignore packages/cli/stubs/docs/_gitignore
packages/cli/stubs/extension/.gitignore packages/cli/stubs/extension/_gitignore
packages/cli/stubs/pwa/.gitignore packages/cli/stubs/pwa/_gitignore