@jsenv/cli 0.0.5 → 0.0.7

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 CHANGED
@@ -247,7 +247,8 @@ write_files: {
247
247
  if (
248
248
  directoryEntryName === ".jsenv" ||
249
249
  directoryEntryName === "dist" ||
250
- directoryEntryName === "node_modules"
250
+ directoryEntryName === "node_modules" ||
251
+ directoryEntryName === "readme.md"
251
252
  ) {
252
253
  continue;
253
254
  }
@@ -258,6 +259,22 @@ write_files: {
258
259
  );
259
260
  const fromStat = statSync(fromUrl);
260
261
  if (fromStat.isDirectory()) {
262
+ if (directoryEntryName === "src" || directoryEntryName === "tests") {
263
+ // copy src and tests if they don't exists
264
+ if (existsSync(toUrl)) {
265
+ continue;
266
+ }
267
+ // for web the presence of index.html or main.html at the root
268
+ // prevent src/ content from being copied
269
+ if (templateName.startsWith("web")) {
270
+ if (existsSync(new URL("./index.html", directoryUrl))) {
271
+ continue;
272
+ }
273
+ if (existsSync(new URL("./main.html", directoryUrl))) {
274
+ continue;
275
+ }
276
+ }
277
+ }
261
278
  copyDirectoryContent(
262
279
  ensurePathnameTrailingSlash(fromUrl),
263
280
  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.7",
4
4
  "description": "Command Line Interface for jsenv",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -12,10 +12,10 @@
12
12
  },
13
13
  "devDependencies": {
14
14
  "@jsenv/assert": "4.1.4",
15
- "@jsenv/core": "39.2.1",
15
+ "@jsenv/core": "39.2.2",
16
16
  "@jsenv/eslint-config": "16.5.2",
17
17
  "@jsenv/eslint-import-resolver": "8.1.2",
18
- "@jsenv/test": "3.3.11",
18
+ "@jsenv/test": "3.3.12",
19
19
  "eslint": "8.56.0",
20
20
  "eslint-plugin-import": "2.29.1",
21
21
  "prettier": "3.3.3"
@@ -0,0 +1,11 @@
1
+ This template is a node project pre-configured with jsenv.
2
+
3
+ You could just copy paste the files on your machine to start using it. There is also a command to do that:
4
+
5
+ ```console
6
+ npx @jsenv/cli --node-package
7
+ ```
8
+
9
+ This template have scripts declared in [package.json#scripts](./package.json#L6):
10
+
11
+ - `npm run test`: execute test files; Documented in [I) Test in Node](../../../../docs/users/i_test_in_node/i_test_in_node.md).
@@ -17,12 +17,12 @@
17
17
  "@babel/eslint-parser": "7.24.8",
18
18
  "@babel/plugin-syntax-import-assertions": "7.24.7",
19
19
  "@jsenv/assert": "4.1.4",
20
- "@jsenv/core": "39.2.1",
20
+ "@jsenv/core": "39.2.2",
21
21
  "@jsenv/eslint-config": "16.5.2",
22
22
  "@jsenv/eslint-import-resolver": "8.1.2",
23
23
  "@jsenv/plugin-bundling": "2.6.17",
24
24
  "@jsenv/plugin-minification": "1.5.5",
25
- "@jsenv/test": "3.3.11",
25
+ "@jsenv/test": "3.3.12",
26
26
  "eslint": "8.56.0",
27
27
  "eslint-plugin-html": "8.1.1",
28
28
  "eslint-plugin-import": "2.29.1",
@@ -0,0 +1,14 @@
1
+ This template is a web project pre-configured with jsenv.
2
+
3
+ You could just copy paste the files on your machine to start using it. There is also a command to do that:
4
+
5
+ ```console
6
+ npx @jsenv/cli --web
7
+ ```
8
+
9
+ This template have scripts declared in [package.json#scripts](./package.json#L6):
10
+
11
+ - `npm run dev`: starts a server for source files; Documented in [B) Dev](../../../../docs/users/b_dev/b_dev.md).
12
+ - `npm run build`: generate build files; Documented in [C) Build](../../../../docs/users/c_build/c_build.md).
13
+ - `npm run build:serve`: start a server for build files; Documented in [C) Build#how-to-serve-build-files](../../../../docs/users/c_build/c_build.md#3-how-to-serve-build-files).
14
+ - `npm run test`: execute test files; Documented in [D) Test](../../../../docs/users/d_test/d_test.md).
@@ -19,12 +19,12 @@
19
19
  "@babel/plugin-syntax-import-assertions": "7.24.7",
20
20
  "@jsenv/custom-elements-redefine": "0.0.1",
21
21
  "@jsenv/assert": "4.1.4",
22
- "@jsenv/core": "39.2.1",
22
+ "@jsenv/core": "39.2.2",
23
23
  "@jsenv/plugin-bundling": "2.6.17",
24
24
  "@jsenv/plugin-minification": "1.5.5",
25
25
  "@jsenv/eslint-config": "16.5.2",
26
26
  "@jsenv/eslint-import-resolver": "8.1.2",
27
- "@jsenv/test": "3.3.11",
27
+ "@jsenv/test": "3.3.12",
28
28
  "eslint": "8.56.0",
29
29
  "eslint-plugin-html": "8.1.1",
30
30
  "eslint-plugin-import": "2.29.1",
@@ -0,0 +1,14 @@
1
+ This template is a web project using web components pre-configured with jsenv.
2
+
3
+ You could just copy paste the files on your machine to start using it. There is also a command to do that:
4
+
5
+ ```console
6
+ npx @jsenv/cli --web-components
7
+ ```
8
+
9
+ This template have scripts declared in [package.json#scripts](./package.json#L6):
10
+
11
+ - `npm run dev`: starts a server for source files; Documented in [B) Dev](../../../../docs/users/b_dev/b_dev.md).
12
+ - `npm run build`: generate build files; Documented in [C) Build](../../../../docs/users/c_build/c_build.md).
13
+ - `npm run build:serve`: start a server for build files; Documented in [C) Build#how-to-serve-build-files](../../../../docs/users/c_build/c_build.md#3-how-to-serve-build-files).
14
+ - `npm run test`: execute test files; Documented in [D) Test](../../../../docs/users/d_test/d_test.md).
@@ -22,13 +22,13 @@
22
22
  "@babel/plugin-syntax-import-assertions": "7.24.7",
23
23
  "@babel/plugin-transform-react-jsx": "7.24.7",
24
24
  "@jsenv/assert": "4.1.4",
25
- "@jsenv/core": "39.2.1",
26
- "@jsenv/plugin-preact": "1.6.2",
25
+ "@jsenv/core": "39.2.2",
26
+ "@jsenv/plugin-preact": "1.6.3",
27
27
  "@jsenv/plugin-bundling": "2.6.17",
28
28
  "@jsenv/plugin-minification": "1.5.5",
29
29
  "@jsenv/eslint-config": "16.5.2",
30
30
  "@jsenv/eslint-import-resolver": "8.1.2",
31
- "@jsenv/test": "3.3.11",
31
+ "@jsenv/test": "3.3.12",
32
32
  "eslint": "8.56.0",
33
33
  "eslint-plugin-html": "8.1.1",
34
34
  "eslint-plugin-import": "2.29.1",
@@ -0,0 +1,14 @@
1
+ This template is a web project using preact pre-configured with jsenv.
2
+
3
+ You could just copy paste the files on your machine to start using it. There is also a command to do that:
4
+
5
+ ```console
6
+ npx @jsenv/cli --web-preact
7
+ ```
8
+
9
+ This template have scripts declared in [package.json#scripts](./package.json#L6):
10
+
11
+ - `npm run dev`: starts a server for source files; Documented in [B) Dev](../../../../docs/users/b_dev/b_dev.md).
12
+ - `npm run build`: generate build files; Documented in [C) Build](../../../../docs/users/c_build/c_build.md).
13
+ - `npm run build:serve`: start a server for build files; Documented in [C) Build#how-to-serve-build-files](../../../../docs/users/c_build/c_build.md#3-how-to-serve-build-files).
14
+ - `npm run test`: execute test files; Documented in [D) Test](../../../../docs/users/d_test/d_test.md).
@@ -23,13 +23,13 @@
23
23
  "@babel/plugin-syntax-import-assertions": "7.24.7",
24
24
  "@babel/plugin-transform-react-jsx": "7.24.7",
25
25
  "@jsenv/assert": "4.1.4",
26
- "@jsenv/core": "39.2.1",
27
- "@jsenv/plugin-react": "1.5.2",
26
+ "@jsenv/core": "39.2.2",
27
+ "@jsenv/plugin-react": "1.5.3",
28
28
  "@jsenv/plugin-bundling": "2.6.17",
29
29
  "@jsenv/plugin-minification": "1.5.5",
30
30
  "@jsenv/eslint-config": "16.5.2",
31
31
  "@jsenv/eslint-import-resolver": "8.1.2",
32
- "@jsenv/test": "3.3.11",
32
+ "@jsenv/test": "3.3.12",
33
33
  "eslint": "8.56.0",
34
34
  "eslint-plugin-html": "8.1.1",
35
35
  "eslint-plugin-import": "2.29.1",
@@ -0,0 +1,14 @@
1
+ This template is a web project using react pre-configured with jsenv.
2
+
3
+ You could just copy paste the files on your machine to start using it. There is also a command to do that:
4
+
5
+ ```console
6
+ npx @jsenv/cli --web-react
7
+ ```
8
+
9
+ This template have scripts declared in [package.json#scripts](./package.json#L6):
10
+
11
+ - `npm run dev`: starts a server for source files; Documented in [B) Dev](../../../../docs/users/b_dev/b_dev.md).
12
+ - `npm run build`: generate build files; Documented in [C) Build](../../../../docs/users/c_build/c_build.md).
13
+ - `npm run build:serve`: start a server for build files; Documented in [C) Build#how-to-serve-build-files](../../../../docs/users/c_build/c_build.md#3-how-to-serve-build-files).
14
+ - `npm run test`: execute test files; Documented in [D) Test](../../../../docs/users/d_test/d_test.md).