@jsenv/core 27.0.0-alpha.93 → 27.0.0
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 +62 -0
- package/dist/js/s.js +580 -380
- package/dist/js/s.js.map +207 -0
- package/dist/main.js +4834 -456
- package/package.json +10 -10
- package/src/build/build.js +1 -1
- package/src/build/start_build_server.js +46 -44
- package/src/dev/plugins/toolbar/client/jsenv_logo.svg +59 -63
- package/src/dev/start_dev_server.js +62 -52
- package/src/omega/kitchen.js +1 -0
- package/src/omega/server/file_service.js +8 -1
- package/src/omega/url_graph.js +43 -21
- package/src/plugins/node_esm_resolution/jsenv_plugin_node_esm_resolution.js +48 -48
- package/src/plugins/plugin_controller.js +1 -0
- package/src/plugins/plugins.js +5 -0
- package/src/plugins/transpilation/as_js_classic/async-to-promises.js +3844 -0
- package/src/plugins/transpilation/as_js_classic/client/s.js +63 -54
- package/src/plugins/transpilation/as_js_classic/helpers-string.js +1 -0
- package/src/plugins/transpilation/as_js_classic/jsenv_plugin_as_js_classic.js +5 -3
- package/src/plugins/transpilation/jsenv_plugin_top_level_await.js +8 -0
- package/src/test/coverage/coverage_reporter_html_directory.js +8 -12
- package/src/test/coverage/coverage_reporter_json_file.js +5 -10
- package/src/test/coverage/coverage_reporter_text_log.js +3 -3
- package/src/test/execute_plan.js +13 -14
- package/src/test/execute_test_plan.js +35 -30
- package/dist/s.js +0 -626
- package/dist/s.js.map +0 -205
- package/readme.md +0 -372
package/README.md
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# @jsenv/core [](https://www.npmjs.com/package/@jsenv/core)
|
|
2
|
+
|
|
3
|
+
Jsenv was first created to write tests that could be executed in different runtimes. It has naturally evolved to cover the core needs of a JavaScript project.
|
|
4
|
+
|
|
5
|
+
- :exploding_head: Directly execute HTML files as tests
|
|
6
|
+
- :relieved: Consistent and integral developer experience (dev + test + build)
|
|
7
|
+
- :relieved: Same dev experience for source and test files
|
|
8
|
+
- :ok_hand: Seamless integration with standard HTML, CSS and JS
|
|
9
|
+
|
|
10
|
+
# Demo
|
|
11
|
+
|
|
12
|
+
Run the following command to create a demo of a jsenv project on your machine.
|
|
13
|
+
|
|
14
|
+
```console
|
|
15
|
+
npm create jsenv@latest
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
> "web" demos are running tests in headless browsers. If you never have installed playwright on your machine npm install can take a bit of time.
|
|
19
|
+
|
|
20
|
+
# Installation
|
|
21
|
+
|
|
22
|
+
```console
|
|
23
|
+
npm install --save-dev @jsenv/core
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
_@jsenv/core_ is tested on Mac, Windows, Linux on Node.js 16.14.0. Other operating systems and Node.js versions are not tested.
|
|
27
|
+
|
|
28
|
+
# Documentation
|
|
29
|
+
|
|
30
|
+
| Link | Description |
|
|
31
|
+
| -------------------------------------------------- | ---------------------------------------------- |
|
|
32
|
+
| [Browser support](./docs/browser_support.md) | Documentation around browser support |
|
|
33
|
+
| [Url resolution](./docs/url_resolution.md) | Url resolution inside and outside js modules |
|
|
34
|
+
| [Assets and workers](./docs/assets_and_workers.md) | How to use assets and workers |
|
|
35
|
+
| [NPM package](./docs/npm_package.md) | How to use a NPM package (especially commonjs) |
|
|
36
|
+
|
|
37
|
+
# Name
|
|
38
|
+
|
|
39
|
+
The name "jsenv" stands for JavaScript environments. This is because the original purpose of jsenv was to bring closer two JavaScript runtimes: web browsers and Node.js.
|
|
40
|
+
|
|
41
|
+
Maybe "jsenv" should be written "JSEnv"? That makes typing the name too complex:
|
|
42
|
+
|
|
43
|
+
1. Hold `shift` on keyboard
|
|
44
|
+
2. While holding `shift`, type `JSE`
|
|
45
|
+
3. Release `shift`
|
|
46
|
+
4. Finally, type `nv`.
|
|
47
|
+
|
|
48
|
+
No one wants to do that: the prefered syntax is "jsenv".
|
|
49
|
+
|
|
50
|
+
# Logo
|
|
51
|
+
|
|
52
|
+
The logo is composed by the name at the center and two circles orbiting around it. One of the circle is web browsers, the other is Node.js. It represents the two JavaScript environments supported by jsenv.
|
|
53
|
+
|
|
54
|
+

|
|
55
|
+
|
|
56
|
+
# See also
|
|
57
|
+
|
|
58
|
+
| Link | Description |
|
|
59
|
+
| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------ |
|
|
60
|
+
| [@jsenv/assert](https://github.com/jsenv/assert) | NPM package to write assertions |
|
|
61
|
+
| [I am too lazy for a test framework](https://dev.to/dmail/i-am-too-lazy-for-a-test-framework-92f) | Article presenting a straightforward testing experience |
|
|
62
|
+
| [@jsenv/template-pwa](https://github.com/jsenv/jsenv-template-pwa) | GitHub repository template for a progressive web application |
|