@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.
Files changed (2) hide show
  1. package/jsenv_cli.js +16 -0
  2. 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),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/cli",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "description": "Command Line Interface for jsenv",
5
5
  "license": "MIT",
6
6
  "repository": {