Skip to content

Commit

Permalink
Static files are bundled correctly for distribution.
Browse files Browse the repository at this point in the history
  • Loading branch information
filipstachura committed Nov 7, 2024
2 parents 8f31a7f + 0030680 commit 706c5a5
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@
.pyc
__pycache__/
*.egg-info
build
dist
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
recursive-include inst *
10 changes: 8 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
[project]
name = "shiny-router"
version = "0.1.0"
name = "shiny_router"
version = "0.1.2"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.12"
dependencies = [
"pandas",
"shiny",
]

[tool.setuptools]
include-package-data = true

[tool.setuptools.package-data]
"shiny_router" = ["www/*"]
2 changes: 1 addition & 1 deletion src/shiny_router/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .router import route_link, router_ui, route, router_server

def hello() -> str:
return "Hello from shiny-router!"
return "Hello from shiny_router!"
2 changes: 1 addition & 1 deletion src/shiny_router/router.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def router_ui_internal(router):
pkg_dependency = HTMLDependency("shiny_router", "0.0.1",
source={
"package": "shiny_router",
"subdir": str(PurePath(__file__).parent.parent.parent / "inst" / "www"),
"subdir": str(PurePath(__file__).parent / "www"),
},
script={"src": js_file, "type": "module"},
stylesheet={"href": css_file}
Expand Down
1 change: 1 addition & 0 deletions src/shiny_router/www
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 706c5a5

Please sign in to comment.