Skip to content

Commit 783075f

Browse files
committed
fix build and test
1 parent 5073c6c commit 783075f

21 files changed

+62
-4805
lines changed

.editorconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,14 @@ end_of_line = lf
1414
indent_size = 4
1515
max_line_length = 120
1616

17+
[*.yml]
18+
indent_size = 4
19+
1720
[*.md]
1821
indent_size = 4
1922

2023
[*.html]
24+
indent_size = 4
2125
max_line_length = off
2226

2327
[*.js]

MANIFEST.in

Lines changed: 0 additions & 2 deletions
This file was deleted.

pyproject.toml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[build-system]
22
build-backend = "hatchling.build"
3-
requires = ["hatchling"]
3+
requires = ["hatchling", "hatch-build-scripts"]
44

55
[project]
66
name = "reactpy_router"
@@ -35,13 +35,21 @@ path = "src/reactpy_router/__init__.py"
3535

3636
[tool.hatch.build.targets.sdist]
3737
include = ["/src"]
38+
artifacts = ["/src/reactpy_router/static/bundle.js"]
3839

3940
[tool.hatch.metadata]
4041
license-files = { paths = ["LICENSE.md"] }
4142

4243
[tool.hatch.envs.default]
4344
installer = "uv"
4445

46+
[[tool.hatch.build.hooks.build-scripts.scripts]]
47+
commands = [
48+
"bun install --cwd src/js",
49+
"bun build src/js/src/index.js --outfile src/reactpy_router/static/bundle.js --minify",
50+
]
51+
artifacts = []
52+
4553
# >>> Hatch Tests <<<
4654

4755
[tool.hatch.envs.hatch-test]

requirements.txt

Lines changed: 0 additions & 7 deletions
This file was deleted.

requirements/build-docs.txt

Lines changed: 0 additions & 13 deletions
This file was deleted.

requirements/build-pkg.txt

Lines changed: 0 additions & 4 deletions
This file was deleted.

requirements/check-style.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

requirements/check-types.txt

Lines changed: 0 additions & 2 deletions
This file was deleted.

requirements/pkg-deps.txt

Lines changed: 0 additions & 2 deletions
This file was deleted.

requirements/test-env.txt

Lines changed: 0 additions & 5 deletions
This file was deleted.

requirements/test-run.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

setup.cfg

Lines changed: 0 additions & 9 deletions
This file was deleted.

setup.py

Lines changed: 0 additions & 131 deletions
This file was deleted.

src/js/.eslintrc.json

Lines changed: 0 additions & 22 deletions
This file was deleted.

src/js/bun.lockb

104 KB
Binary file not shown.

src/js/eslint.config.mjs

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
import react from "eslint-plugin-react";
2+
import globals from "globals";
3+
import path from "node:path";
4+
import { fileURLToPath } from "node:url";
5+
import js from "@eslint/js";
6+
import { FlatCompat } from "@eslint/eslintrc";
7+
8+
const __filename = fileURLToPath(import.meta.url);
9+
const __dirname = path.dirname(__filename);
10+
const compat = new FlatCompat({
11+
baseDirectory: __dirname,
12+
recommendedConfig: js.configs.recommended,
13+
allConfig: js.configs.all,
14+
});
15+
16+
export default [
17+
...compat.extends("eslint:recommended", "plugin:react/recommended"),
18+
{
19+
plugins: {
20+
react,
21+
},
22+
23+
languageOptions: {
24+
globals: {
25+
...globals.browser,
26+
...globals.node,
27+
},
28+
29+
ecmaVersion: "latest",
30+
sourceType: "module",
31+
},
32+
33+
settings: {
34+
react: {
35+
version: "18.2.0",
36+
},
37+
},
38+
39+
rules: {
40+
"react/prop-types": "off",
41+
},
42+
},
43+
];

0 commit comments

Comments
 (0)