[fix] rename dotfiles to avoid template problems
ADD
.changeset/odd-ligers-march.md
+---
+'create-svelte': patch
+---
+
+include missing .npmrc in templates

MODIFY
packages/create-svelte/bin.js
packages/create-svelte/bin.js
@@ -134,7 +134,7 @@ async function main() {
*/
function write_template_files(template, typescript, name, cwd) {
const dir = dist(`templates/${template}`);
- copy(`${dir}/assets`, cwd, (name) => name.replace('gitignore', '.gitignore'));
+ copy(`${dir}/assets`, cwd, (name) => name.replace('DOT-', '.'));
copy(`${dir}/package.json`, `${cwd}/package.json`);
const manifest = `${dir}/files.${typescript ? 'ts' : 'js'}.json`;

MODIFY
packages/create-svelte/scripts/build-templates.js
packages/create-svelte/scripts/build-templates.js
@@ -56,7 +56,7 @@ async function generate_templates(shared) {
contents
});
} else {
- const dest = path.join(assets, name).replace('.gitignore', 'gitignore'); // npm does wacky stuff to gitignores
+ const dest = path.join(assets, name.replace(/^\./, 'DOT-'));
mkdirp(path.dirname(dest));
fs.copyFileSync(path.join(cwd, name), dest);
}

[fix] rename dotfiles to avoid template problems (#2990)