@leaders-tech/schemio-playground 0.1.0 → 0.1.3
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
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Schemio playground web component
|
|
2
2
|
|
|
3
3
|
This package registers a lazy-loaded `<schemio-playground>` custom element. It
|
|
4
|
-
contains a Schemio editor,
|
|
5
|
-
and optional browser-local saving.
|
|
4
|
+
contains a Schemio editor, error diagnostics, a live debugger with several
|
|
5
|
+
independent test cases, and optional browser-local saving.
|
|
6
6
|
|
|
7
7
|
Edit this file when the package API, installation command, or release process
|
|
8
8
|
changes. Copy it when another standalone web component needs a short package
|
|
@@ -17,8 +17,7 @@ project with:
|
|
|
17
17
|
pnpm add @leaders-tech/schemio-playground
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
install it directly from GitHub:
|
|
20
|
+
To use the latest repository version directly, install it from GitHub:
|
|
22
21
|
|
|
23
22
|
```bash
|
|
24
23
|
pnpm add github:leaders-tech/scheme#path:/frontend
|
|
@@ -59,11 +58,40 @@ show a non-editable program.
|
|
|
59
58
|
The element dispatches a bubbling `schemio-change` event after every edit. Its
|
|
60
59
|
`event.detail` contains `{ source, isValid }`.
|
|
61
60
|
|
|
61
|
+
## Use direct browser files
|
|
62
|
+
|
|
63
|
+
Every `schemio-playground-v…` GitHub Release also contains
|
|
64
|
+
`schemio-playground-<version>-browser.tar.gz` and its SHA-256 checksum. Download
|
|
65
|
+
the archive from the [releases page](https://github.com/leaders-tech/scheme/releases),
|
|
66
|
+
unpack it next to the static course page, and rename its directory to
|
|
67
|
+
`schemio-playground` if desired:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
tar -xzf schemio-playground-<version>-browser.tar.gz
|
|
71
|
+
mv schemio-playground-<version>-browser schemio-playground
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Keep `schemio-playground.js` and `chunks/` together. From a neighbouring HTML
|
|
75
|
+
page served by the same static website, load it with:
|
|
76
|
+
|
|
77
|
+
```html
|
|
78
|
+
<script type="module" src="./schemio-playground/schemio-playground.js"></script>
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
The archive includes its own `README.md` with the complete copy-paste example.
|
|
82
|
+
|
|
62
83
|
## Release the package
|
|
63
84
|
|
|
64
85
|
The GitHub Actions workflow publishes the package after a tag named
|
|
65
86
|
`schemio-playground-v<package version>` is pushed, for example
|
|
66
|
-
`schemio-playground-v0.1.
|
|
67
|
-
installs the resulting tarball with pnpm.
|
|
68
|
-
|
|
69
|
-
|
|
87
|
+
`schemio-playground-v0.1.3`. It first runs the tests, builds the package, and
|
|
88
|
+
installs the resulting tarball with pnpm.
|
|
89
|
+
|
|
90
|
+
For the same tag, it also attaches a browser-ready archive and SHA-256 checksum
|
|
91
|
+
to the GitHub Release.
|
|
92
|
+
|
|
93
|
+
The package uses npm Trusted Publishing: npm must link this package to
|
|
94
|
+
`leaders-tech/scheme` and the `schemio-playground-package.yml` workflow, with
|
|
95
|
+
the `npm publish` action allowed. The workflow uses OpenID Connect and needs
|
|
96
|
+
no `NPM_TOKEN` secret or bypass-2FA token. Keep npm's recommended publishing
|
|
97
|
+
access setting: require 2FA and disallow bypass-2FA tokens.
|