create-svelte-ux
Advanced tools
Comparing version 0.4.1 to 0.4.2
11
bin.js
@@ -124,3 +124,4 @@ #!/usr/bin/env node | ||
}, | ||
['.meta.json', '.meta..gitignore'] | ||
{ '.meta..gitignore': '.gitignore' }, | ||
['.meta.json'] | ||
); | ||
@@ -150,2 +151,3 @@ | ||
/** @type {Record<string, string>} */ transformMap = {}, | ||
/** @type {Record<string, string>} */ transformFileMap = {}, | ||
/** @type {string[]} */ ignoreList = [] | ||
@@ -165,7 +167,10 @@ ) { | ||
} | ||
const destFilePath = path.join(destDir, sourcePathRel); | ||
const fileDest = Object.entries(transformFileMap).reduce((acc, [key, value]) => { | ||
return acc.replace(key, value); | ||
}, p); | ||
const destFilePath = path.join(destDir, fileDest); | ||
const stats = fs.statSync(sourcePath); | ||
if (stats.isDirectory()) { | ||
// In case of a directory, copy files recursively. | ||
copy(sourcePath, destFilePath, transformMap, ignoreList); | ||
copy(sourcePath, destFilePath, transformMap, transformFileMap, ignoreList); | ||
} else if (stats.isFile()) { | ||
@@ -172,0 +177,0 @@ // Read the source file. |
{ | ||
"name": "create-svelte-ux", | ||
"version": "0.4.1", | ||
"version": "0.4.2", | ||
"description": "A CLI for creating new Svelte UX projects", | ||
@@ -5,0 +5,0 @@ "repository": { |
49088
693