@jsenv/cli 0.0.5 → 0.0.6
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/jsenv_cli.js +16 -0
- package/package.json +1 -1
package/jsenv_cli.js
CHANGED
|
@@ -258,6 +258,22 @@ write_files: {
|
|
|
258
258
|
);
|
|
259
259
|
const fromStat = statSync(fromUrl);
|
|
260
260
|
if (fromStat.isDirectory()) {
|
|
261
|
+
if (directoryEntryName === "src" || directoryEntryName === "tests") {
|
|
262
|
+
// copy src and tests if they don't exists
|
|
263
|
+
if (existsSync(toUrl)) {
|
|
264
|
+
continue;
|
|
265
|
+
}
|
|
266
|
+
// for web the presence of index.html or main.html at the root
|
|
267
|
+
// prevent src/ content from being copied
|
|
268
|
+
if (templateName.startsWith("web")) {
|
|
269
|
+
if (existsSync(new URL("./index.html", directoryUrl))) {
|
|
270
|
+
continue;
|
|
271
|
+
}
|
|
272
|
+
if (existsSync(new URL("./main.html", directoryUrl))) {
|
|
273
|
+
continue;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
}
|
|
261
277
|
copyDirectoryContent(
|
|
262
278
|
ensurePathnameTrailingSlash(fromUrl),
|
|
263
279
|
ensurePathnameTrailingSlash(toUrl),
|