Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update name load-shinylive-sw.js to load-shinylive-sw.js #15

Merged
merged 3 commits into from
Sep 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion shinylive/_app_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def read_app_files(appdir: Path, destdir: Path) -> list[FileContentJson]:

# Add the file to the app_files list.
for filename in files:
if rel_dir == ".":
if rel_dir == ".": # pyright: ignore[reportUnnecessaryComparison]
output_filename = filename
else:
output_filename = str(rel_dir / filename)
Expand Down
4 changes: 2 additions & 2 deletions shinylive/_deps.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,15 +182,15 @@ def _shinylive_common_dep_htmldep() -> QuartoHtmlDependency:
# Add base python packages as resources
resources.extend(base_package_deps_htmldepitems())

# Sort scripts so that load-serviceworker.js is first, and run-python-blocks.js is
# Sort scripts so that load-shinylive-sw.js is first, and run-python-blocks.js is
# last.
def scripts_sort_fun(x: str | HtmlDepItem) -> int:
if isinstance(x, str):
filename = x
else:
filename = os.path.basename(x["name"])

if filename == "load-serviceworker.js":
if filename == "load-shinylive-sw.js":
return 0
elif filename == "run-python-blocks.js":
return 2
Expand Down