Skip to content

Commit

Permalink
[fix] rename dotfiles to avoid template problems
Browse files Browse the repository at this point in the history
  • Loading branch information
Conduitry committed Dec 6, 2021
1 parent 083491f commit fd81832
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/create-svelte/bin.js
Original file line number Diff line number Diff line change
Expand Up @@ -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`;
Expand Down
2 changes: 1 addition & 1 deletion packages/create-svelte/scripts/build-templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit fd81832

Please sign in to comment.