Skip to content

Commit 7675dae

Browse files
authored
Bump pyscript version and improve template (#140)
* Bump pyscript version * Fix tests * Address Andrea comments
1 parent c673813 commit 7675dae

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

src/pyscript/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import typer
88
from rich.console import Console
99

10-
LATEST_PYSCRIPT_VERSION = "2023.11.2"
10+
LATEST_PYSCRIPT_VERSION = "2024.2.1"
1111
APPNAME = "pyscript"
1212
APPAUTHOR = "python"
1313
DEFAULT_CONFIG_FILENAME = ".pyscriptconfig"

src/pyscript/templates/basic.html

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
<!DOCTYPE html>
22
<html lang="en">
3-
<head>
3+
<head>
44
<title>{{ title }}</title>
5+
6+
<!-- Recommended meta tags -->
7+
<meta charset="UTF-8">
8+
<meta name="viewport" content="width=device-width,initial-scale=1.0">
9+
510
<link rel="stylesheet" href="https://pyscript.net/releases/{{ pyscript_version }}/core.css">
611
<script type="module" src="https://pyscript.net/releases/{{ pyscript_version }}/core.js"></script>
7-
</head>
8-
<body>
9-
<script type="py" src="./{{ python_file_path }}" config="./{{ config_file_path }}"></script>
10-
</body>
12+
</head>
13+
<body>
14+
<script type="py" src="./{{ python_file_path }}" config="./{{ config_file_path }}" terminal></script>
15+
</body>
1116
</html>

tests/test_generator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ def check_project_files(
191191
with html_file_path.open() as fp:
192192
contents = fp.read()
193193
assert (
194-
f'<script type="py" src="./{python_file}" config="./{config_file}">'
194+
f'<script type="py" src="./{python_file}" config="./{config_file}" terminal>'
195195
in contents
196196
)
197197

0 commit comments

Comments
 (0)