listpage_cli 0.0.188 → 0.0.189
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/cli.js
CHANGED
|
@@ -100,7 +100,8 @@ function copyDir(src, dest) {
|
|
|
100
100
|
ensureDir(dest);
|
|
101
101
|
for (const entry of fs_1.default.readdirSync(src)) {
|
|
102
102
|
const s = path_1.default.join(src, entry);
|
|
103
|
-
const
|
|
103
|
+
const outEntry = entry === "gitignore" ? ".gitignore" : entry;
|
|
104
|
+
const d = path_1.default.join(dest, outEntry);
|
|
104
105
|
const stat = fs_1.default.statSync(s);
|
|
105
106
|
if (stat.isDirectory())
|
|
106
107
|
copyDir(s, d);
|
|
@@ -184,7 +185,10 @@ function copyTemplateDir(srcDir, destDir, vars) {
|
|
|
184
185
|
files.forEach((src) => {
|
|
185
186
|
const rel = path_1.default.relative(srcDir, src);
|
|
186
187
|
const isTmpl = rel.endsWith(".tmpl");
|
|
187
|
-
|
|
188
|
+
let outRel = isTmpl ? rel.slice(0, -5) : rel;
|
|
189
|
+
if (path_1.default.basename(outRel) === "gitignore") {
|
|
190
|
+
outRel = path_1.default.join(path_1.default.dirname(outRel), ".gitignore");
|
|
191
|
+
}
|
|
188
192
|
const dest = path_1.default.join(destDir, outRel);
|
|
189
193
|
ensureDir(path_1.default.dirname(dest));
|
|
190
194
|
const buf = fs_1.default.readFileSync(src, "utf8");
|
package/package.json
CHANGED