@jsenv/core 38.2.4 → 38.2.5

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/README.md CHANGED
@@ -24,7 +24,9 @@ When coding, we spend most of our time working on source files. At some point we
24
24
  This huge gap between source files and test files creates a context switching costing a lot of cognitive energy.
25
25
  Jsenv makes a special effort to [provide a solution](<https://github.com/jsenv/core/wiki/D)-Test>) where switching from source files to test files is easy.
26
26
 
27
- ## Others
27
+ It also means tools used on source files can be reused on test files: ESlint, VSCode debugger, etc. No need to maintain separate tools and/or configurations.
28
+
29
+ ## Other good parts
28
30
 
29
31
  - A [large browser support during dev](<https://github.com/jsenv/core/wiki/B)-Dev#21-browser-support>). Because some people might be happy to use an other browser than the latest chrome during dev. Moreover it is useful to reproduce bug specific to certain browsers.
30
32
  - A [large browser support after build](<https://github.com/jsenv/core/wiki/C)-Build#211-maximal-browser-support>). Because some product still needs to support old versions of Firefox, Chrome and Safari.
@@ -37,7 +39,58 @@ Jsenv makes a special effort to [provide a solution](<https://github.com/jsenv/c
37
39
 
38
40
  # Demos
39
41
 
40
- [H) Demos](<https://github.com/jsenv/core/wiki/H)-Demos>).
42
+ A demo is a project pre-configured with jsenv.
43
+
44
+ The following command can be used to install and try a demo:
45
+
46
+ ```console
47
+ npm create jsenv@latest
48
+ ```
49
+
50
+ It will prompt to choose one of the available demo:
51
+
52
+ ```console
53
+ ? Select a demo: › - Use arrow-keys. Return to submit.
54
+ ❯ web
55
+ web-react
56
+ web-preact
57
+ node-package
58
+ ```
59
+
60
+ Selecting "web" will copy [create-jsenv/demo-web](https://github.com/jsenv/core/tree/bc7fb0aa2c8ced1db4d7583a2ea1858be464c23b/packages/related/create-jsenv/demo-web)<sup>↗</sup> files into a directory:
61
+
62
+ ```console
63
+ ✔ Select a demo: › web
64
+ ✔ copy demo files into "[...]jsenv-demo-web/" (done in 0.1 second)
65
+ ----- commands to run -----
66
+ cd jsenv-demo-web
67
+ npm install
68
+ npm start
69
+ ---------------------------
70
+ ```
71
+
72
+ After running the suggested commands the demo is ready.
73
+
74
+ > **Info**
75
+ > "npm install" can take time because tests are runned in headless browsers that needs to be installed first.
76
+
77
+ The demo contains preconfigured scripts:
78
+
79
+ - `npm run dev`: starts a server for source files; Documented in [B) Dev](<https://github.com/jsenv/core/wiki/B)-Dev>).
80
+ - `npm run build`: generate files optimized for production; Documented in [C) Build](<https://github.com/jsenv/core/wiki/C)-Build>).
81
+ - `npm run build:serve`: start a server for build files; Documented in [C) Build#how-to-serve-build-files](<https://github.com/jsenv/core/wiki/C)-Build#3-how-to-serve-build-files>).
82
+ - `npm run test`: execute test files on browsers(s); Documented in [D) Test](<https://github.com/jsenv/core/wiki/D)-Test>).
83
+
84
+ <!--
85
+ The following commands can be used to skip the prompt
86
+
87
+ | Command |
88
+ | ------------------------------------------- |
89
+ | `npm create jsenv@latest -- --web` |
90
+ | `npm create jsenv@latest -- --web-preact` |
91
+ | `npm create jsenv@latest -- --web-react` |
92
+ | `npm create jsenv@latest -- --node-package` |
93
+ -->
41
94
 
42
95
  <!-- # Installation
43
96
 
@@ -2545,7 +2545,8 @@ callback: ${callback}`);
2545
2545
  return { registerCleanupCallback, cleanup };
2546
2546
  };
2547
2547
 
2548
- const fsWatchSupportsRecursive = process.platform !== "linux";
2548
+ const isLinux = process.platform === "linux";
2549
+ const fsWatchSupportsRecursive = !isLinux;
2549
2550
 
2550
2551
  const registerDirectoryLifecycle = (
2551
2552
  source,
@@ -2881,10 +2882,10 @@ const shouldCallUpdated = (entryInfo) => {
2881
2882
  if (stat.atimeMs < stat.mtimeMs) {
2882
2883
  return true;
2883
2884
  }
2884
- if (stat.mtimeMs > previousInfo.stat.mtimeMs) {
2885
- return true;
2885
+ if (isLinux && stat.mtimeMs <= previousInfo.stat.mtimeMs) {
2886
+ return false;
2886
2887
  }
2887
- return false;
2888
+ return true;
2888
2889
  };
2889
2890
 
2890
2891
  const undefinedOrFunction = (value) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/core",
3
- "version": "38.2.4",
3
+ "version": "38.2.5",
4
4
  "description": "Tool to develop, test and build js projects",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -62,7 +62,7 @@
62
62
  "@financial-times/polyfill-useragent-normaliser": "1.10.2",
63
63
  "@jsenv/abort": "4.2.4",
64
64
  "@jsenv/ast": "5.1.4",
65
- "@jsenv/filesystem": "4.3.1",
65
+ "@jsenv/filesystem": "4.3.2",
66
66
  "@jsenv/importmap": "1.2.1",
67
67
  "@jsenv/integrity": "0.0.1",
68
68
  "@jsenv/log": "3.4.0",