code-playpad 0.3.0 → 0.3.1
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 +18 -3
- package/dist/cdn.js +2 -0
- package/dist/standalone.d.ts +6 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@ entirely in the reader's browser. No backend, no iframe, no sign-up.
|
|
|
9
9
|
**[Live demo →](https://code-playpad.swengr.com)**
|
|
10
10
|
|
|
11
11
|
```html
|
|
12
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/code-playpad@0.3.
|
|
12
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/code-playpad@0.3.1/dist/standalone.js"></script>
|
|
13
13
|
|
|
14
14
|
<code-playpad height="auto">
|
|
15
15
|
print("hello from a static page")
|
|
@@ -123,13 +123,18 @@ CDN downloads are what the CDN actually sent.
|
|
|
123
123
|
### From a CDN — nothing to install
|
|
124
124
|
|
|
125
125
|
```html
|
|
126
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/code-playpad@0.3.
|
|
126
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/code-playpad@0.3.1/dist/standalone.js"></script>
|
|
127
127
|
```
|
|
128
128
|
|
|
129
129
|
This is the `standalone` build: CodeMirror is bundled in, so a static blog post
|
|
130
130
|
or a Markdown-rendered page needs only that one tag. Pin the version — an
|
|
131
131
|
unpinned URL follows `latest` and will change under your readers.
|
|
132
132
|
|
|
133
|
+
The full path to `dist/standalone.js` works with every version. The short form,
|
|
134
|
+
`https://cdn.jsdelivr.net/npm/code-playpad@0.3.1`, works from 0.3.1 on; with
|
|
135
|
+
0.3.0 and earlier it leaves the widgets as plain text, so use the full path for
|
|
136
|
+
those.
|
|
137
|
+
|
|
133
138
|
### From npm, with a bundler
|
|
134
139
|
|
|
135
140
|
```bash
|
|
@@ -617,7 +622,17 @@ warms every other page on the site.
|
|
|
617
622
|
## Version history
|
|
618
623
|
|
|
619
624
|
No breaking changes so far: markup and API written against 0.1.3 still work on
|
|
620
|
-
0.3.
|
|
625
|
+
0.3.1.
|
|
626
|
+
|
|
627
|
+
### 0.3.1
|
|
628
|
+
|
|
629
|
+
- **Fixed:** the short jsDelivr URL (`https://cdn.jsdelivr.net/npm/code-playpad@0.3.0`)
|
|
630
|
+
left every widget as plain text. jsDelivr serves the CDN build at that URL
|
|
631
|
+
without redirecting, so its relative imports (`./config-….js`) resolved
|
|
632
|
+
against `/npm/` and failed with 404. Broken in every earlier version; the full path
|
|
633
|
+
(`…/dist/standalone.js`) always worked. The short URL now serves a one-line
|
|
634
|
+
entry that loads `dist/standalone.js` of the same version by absolute URL,
|
|
635
|
+
with every export. The documented snippets now use the full path.
|
|
621
636
|
|
|
622
637
|
### 0.3.0
|
|
623
638
|
|
package/dist/cdn.js
ADDED
package/dist/standalone.d.ts
CHANGED
|
@@ -3,9 +3,13 @@
|
|
|
3
3
|
* page needs one script tag and no import map.
|
|
4
4
|
*
|
|
5
5
|
* Pyodide is still fetched at runtime and never bundled — that is the whole
|
|
6
|
-
* reason this file is ~100KB gzipped instead of
|
|
6
|
+
* reason this file is ~100KB gzipped instead of ~6MB.
|
|
7
7
|
*
|
|
8
|
-
* <script type="module" src="https://cdn.jsdelivr.net/npm/code-playpad"></script>
|
|
8
|
+
* <script type="module" src="https://cdn.jsdelivr.net/npm/code-playpad@0.3.1/dist/standalone.js"></script>
|
|
9
|
+
*
|
|
10
|
+
* The bare package URL works too from 0.3.1: jsDelivr serves dist/cdn.js
|
|
11
|
+
* there, which re-exports this file by absolute URL (see
|
|
12
|
+
* vite.standalone.config.ts).
|
|
9
13
|
* <code-playpad>print("hi")</code-playpad>
|
|
10
14
|
*
|
|
11
15
|
* Prefer the "." entry (with CodeMirror as peer dependencies) if you already
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "code-playpad",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Embeddable browser code playground: a CodeMirror editor that runs Python, JavaScript, TypeScript and a subset of Java in the browser. No backend. One shared worker per page, blocking input(), multi-file projects, lazy per-language loading.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
"homepage": "https://code-playpad.swengr.com",
|
|
111
111
|
"author": "Seung Hun Lee",
|
|
112
112
|
"unpkg": "./dist/standalone.js",
|
|
113
|
-
"jsdelivr": "./dist/
|
|
113
|
+
"jsdelivr": "./dist/cdn.js",
|
|
114
114
|
"engines": {
|
|
115
115
|
"node": ">=18"
|
|
116
116
|
}
|