add support for pygame scripts
This commit is contained in:
parent
fe4b003971
commit
3be22c5654
6 changed files with 180 additions and 89 deletions
|
|
@ -61,12 +61,14 @@
|
|||
icon: "https://jean-marie.mineau.eu/website_assets/platypus.png",
|
||||
|
||||
// Pyscript:
|
||||
pyscript-headers: (
|
||||
"remote-2026.3.1": {
|
||||
html.elem("script", attrs: (src: "./mini-coi.js"))
|
||||
html.elem("script", attrs: (type: "module", src: "https://pyscript.net/releases/2026.3.1/core.js"))
|
||||
html.elem("link", attrs: (rel: "stylesheet", href: "https://pyscript.net/releases/2026.3.1/core.css"))
|
||||
},
|
||||
pyscript-data-list: (
|
||||
"remote-2026.3.1": pyscript-data(
|
||||
"https://pyscript.net/releases/2026.3.1/core.js",
|
||||
additionnal-head-tags: {
|
||||
html.elem("script", attrs: (src: "./mini-coi.js"))
|
||||
html.elem("link", attrs: (rel: "stylesheet", href: "https://pyscript.net/releases/2026.3.1/core.css"))
|
||||
},
|
||||
)
|
||||
),
|
||||
pyscript-version: "remote-2026.3.1",
|
||||
)
|
||||
|
|
@ -125,7 +127,7 @@ pprint([(k, v["title"]) for k, v in data.items()][:10])
|
|||
# [tool.pyscript.files]
|
||||
# "https://peps.python.org/api/peps.json" = "./peps.json"
|
||||
# ///
|
||||
|
||||
# setting tool.pyscript.hide-meta to true will hide the `/// script` section
|
||||
import json
|
||||
from rich.pretty import pprint
|
||||
|
||||
|
|
@ -136,6 +138,19 @@ pprint([(k, v["title"]) for k, v in data.items()][:10])
|
|||
# Inline script metadata
|
||||
```
|
||||
|
||||
```python-run
|
||||
# /// script
|
||||
# dependencies = [
|
||||
# "pygame-ce",
|
||||
# "./isn_s_cube-0.1.0-py3-none-any.whl"
|
||||
# ]
|
||||
# [tool.pyscript]
|
||||
# pygame = true
|
||||
# ///
|
||||
from isn_s_cube import wasm
|
||||
await wasm()
|
||||
```
|
||||
|
||||
#summ.card
|
||||
|
||||
Test, `this is not a code block`, end test.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue