jizy-packer 2.1.22 → 2.1.24
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/cli/init.js +2 -2
- package/package.json +1 -1
package/cli/init.js
CHANGED
|
@@ -7,7 +7,7 @@ function copyAndReplace(srcDir, destDir, replacements) {
|
|
|
7
7
|
const entries = fs.readdirSync(srcDir, { withFileTypes: true });
|
|
8
8
|
console.dir(entries.map(e => e.name));
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
entries.forEach(entry => {
|
|
11
11
|
console.log(entry.name);
|
|
12
12
|
const srcPath = path.join(srcDir, entry.name);
|
|
13
13
|
const destName = entry.name.replace(/\.skel$/, "");
|
|
@@ -25,7 +25,7 @@ function copyAndReplace(srcDir, destDir, replacements) {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
// read json file and check if the name of the package is set
|
|
28
|
-
const pkg = JSON.parse(fs.readFileSync(
|
|
28
|
+
const pkg = JSON.parse(fs.readFileSync(destPath, "utf8"));
|
|
29
29
|
if (pkg.name) {
|
|
30
30
|
return; // skip existing package.json with name set
|
|
31
31
|
}
|