@atomicsmash/init-testing 1.0.0-beta.1 → 1.0.0-beta.2
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/dist/cli.js
CHANGED
|
@@ -51,9 +51,9 @@ const copyFiles = await readdir(copyFolder, {
|
|
|
51
51
|
recursive: true,
|
|
52
52
|
});
|
|
53
53
|
for (const dirent of copyFiles) {
|
|
54
|
-
|
|
55
|
-
if (relativePath.endsWith("/")) {
|
|
56
|
-
relativePath
|
|
54
|
+
let relativePath = pathRelative(copyFolder, `${dirent.path}`);
|
|
55
|
+
if (relativePath !== "" && !relativePath.endsWith("/")) {
|
|
56
|
+
relativePath = `${relativePath}/`;
|
|
57
57
|
}
|
|
58
58
|
if (!dirent.isFile()) {
|
|
59
59
|
continue;
|
|
@@ -71,10 +71,10 @@ for (const dirent of copyFiles) {
|
|
|
71
71
|
]) {
|
|
72
72
|
data = data.replace(search, replace);
|
|
73
73
|
}
|
|
74
|
-
await mkdir(`${process.cwd()}/${relativePath}
|
|
74
|
+
await mkdir(`${process.cwd()}/${relativePath}`.slice(0, -1), {
|
|
75
75
|
recursive: true,
|
|
76
76
|
});
|
|
77
|
-
await writeFile(`${process.cwd()}/${relativePath}
|
|
77
|
+
await writeFile(`${process.cwd()}/${relativePath}${dirent.name}`, data, {
|
|
78
78
|
encoding: "utf8",
|
|
79
79
|
flag: argv.overwriteFiles ? "w" : "wx",
|
|
80
80
|
});
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|