22build-backend = " hatchling.build"
33requires = [" hatchling" , " hatch-build-scripts" ]
44
5+ # #############################
6+ # >>> Hatch Build Config <<< #
7+ # #############################
8+
59[project ]
610name = " reactpy_router"
711description = " A URL router for ReactPy."
@@ -24,7 +28,7 @@ classifiers = [
2428 " Environment :: Web Environment" ,
2529 " Typing :: Typed" ,
2630]
27- dependencies = [" reactpy>=1.0.0" , " typing_extensions" ]
31+ dependencies = [" reactpy>=1.0.0, <2.0.0 " , " typing_extensions" ]
2832dynamic = [" version" ]
2933urls.Changelog = " https://reactive-python.github.io/reactpy-router/latest/about/changelog/"
3034urls.Documentation = " https://reactive-python.github.io/reactpy-router/latest/"
@@ -35,10 +39,10 @@ path = "src/reactpy_router/__init__.py"
3539
3640[tool .hatch .build .targets .sdist ]
3741include = [" /src" ]
38- artifacts = [" /src/reactpy_router/static/bundle.js " ]
42+ artifacts = [" /src/reactpy_router/static/" ]
3943
4044[tool .hatch .build .targets .wheel ]
41- artifacts = [" /src/reactpy_router/static/bundle.js " ]
45+ artifacts = [" /src/reactpy_router/static/" ]
4246
4347[tool .hatch .metadata ]
4448license-files = { paths = [" LICENSE.md" ] }
@@ -53,7 +57,9 @@ commands = [
5357]
5458artifacts = []
5559
56- # >>> Hatch Tests <<<
60+ # ############################
61+ # >>> Hatch Test Runner <<< #
62+ # ############################
5763
5864[tool .hatch .envs .hatch-test ]
5965extra-dependencies = [" pytest-sugar" , " anyio" , " reactpy[testing,starlette]" ]
@@ -63,24 +69,30 @@ matrix-name-format = "{variable}-{value}"
6369[[tool .hatch .envs .hatch-test .matrix ]]
6470python = [" 3.9" , " 3.10" , " 3.11" , " 3.12" ]
6571
66- # >>> Hatch Documentation Scripts <<<
72+ [tool .pytest .ini_options ]
73+ addopts = """ \
74+ --strict-config
75+ --strict-markers
76+ """
77+
78+ # ######################################
79+ # >>> Hatch Documentation Scripts <<< #
80+ # ######################################
6781
6882[tool .hatch .envs .docs ]
6983template = " docs"
70- detached = true
7184dependencies = [
7285 " mkdocs" ,
7386 " mkdocs-git-revision-date-localized-plugin" ,
7487 " mkdocs-material==9.4.0" ,
7588 " mkdocs-include-markdown-plugin" ,
76- " linkcheckmd" ,
7789 " mkdocs-spellcheck[all]" ,
7890 " mkdocs-git-authors-plugin" ,
7991 " mkdocs-minify-plugin" ,
8092 " mike" ,
8193 " mkdocstrings[python]" ,
82- " black" ,
83- " reactpy_router @ {root:uri} " ,
94+ " black" , # Used by mkdocstrings for auto formatting
95+ " linkcheckmd " ,
8496]
8597
8698[tool .hatch .envs .docs .scripts ]
@@ -94,10 +106,23 @@ linkcheck = [
94106deploy_latest = [" cd docs && mike deploy --push --update-aliases {args} latest" ]
95107deploy_develop = [" cd docs && mike deploy --push develop" ]
96108
109+ # ###########################
110+ # >>> Hatch JS Scripts <<< #
111+ # ###########################
97112
98- # >>> Generic Tools <<<
113+ [tool .hatch .envs .javascript ]
114+ detached = true
115+
116+ [tool .hatch .envs .javascript .scripts ]
117+ check = [" cd src/js && bun install" , " cd src/js && bun run check" ]
118+ fix = [" cd src/js && bun install" , " cd src/js && bun run format" ]
119+
120+ # ########################
121+ # >>> Generic Tools <<< #
122+ # ########################
99123
100124[tool .ruff ]
125+ extend-exclude = [" .venv/*" , " .eggs/*" , " build/*" ]
101126line-length = 120
102127format.preview = true
103128lint.extend-ignore = [
@@ -111,13 +136,6 @@ lint.extend-ignore = [
111136 " SLF001" , # Private member accessed
112137]
113138lint.preview = true
114- extend-exclude = [" .venv/*" , " .eggs/*" , " build/*" ]
115-
116- [tool .pytest .ini_options ]
117- addopts = """ \
118- --strict-config
119- --strict-markers
120- """
121139
122140[tool .coverage .run ]
123141branch = true
0 commit comments