litestar-vite 0.1.2__tar.gz → 0.1.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of litestar-vite might be problematic. Click here for more details.
- {litestar_vite-0.1.2 → litestar_vite-0.1.4}/.gitignore +2 -0
- {litestar_vite-0.1.2 → litestar_vite-0.1.4}/.pre-commit-config.yaml +6 -6
- {litestar_vite-0.1.2 → litestar_vite-0.1.4}/PKG-INFO +4 -2
- litestar_vite-0.1.4/examples/htmx/app.py +20 -0
- litestar_vite-0.1.4/examples/htmx/package.json +20 -0
- litestar_vite-0.1.4/examples/htmx/tsconfig.json +31 -0
- litestar_vite-0.1.4/examples/htmx/vite.config.ts +25 -0
- litestar_vite-0.1.4/examples/react/app.py +20 -0
- litestar_vite-0.1.4/examples/vue/__init__.py +0 -0
- litestar_vite-0.1.4/examples/vue/app.py +22 -0
- litestar_vite-0.1.4/examples/vue/package-lock.json +1275 -0
- litestar_vite-0.1.4/examples/vue/package.json +10 -0
- litestar_vite-0.1.4/examples/vue/tsconfig.json +30 -0
- litestar_vite-0.1.4/examples/vue/vite.config.ts +21 -0
- litestar_vite-0.1.4/examples/vue/web/__init__.py +0 -0
- litestar_vite-0.1.4/examples/vue/web/controllers.py +21 -0
- litestar_vite-0.1.4/examples/vue/web/public/.gitkeep +0 -0
- litestar_vite-0.1.4/examples/vue/web/resources/App.vue +25 -0
- litestar_vite-0.1.4/examples/vue/web/resources/assets/vue.svg +1 -0
- litestar_vite-0.1.4/examples/vue/web/resources/main.ts +6 -0
- litestar_vite-0.1.4/examples/vue/web/resources/styles.css +0 -0
- litestar_vite-0.1.4/examples/vue/web/templates/index.html.j2 +18 -0
- litestar_vite-0.1.4/litestar_vite/cli.py +187 -0
- litestar_vite-0.1.4/litestar_vite/commands.py +118 -0
- {litestar_vite-0.1.2 → litestar_vite-0.1.4}/litestar_vite/config.py +44 -9
- {litestar_vite-0.1.2 → litestar_vite-0.1.4}/litestar_vite/loader.py +31 -20
- {litestar_vite-0.1.2 → litestar_vite-0.1.4}/litestar_vite/plugin.py +26 -6
- litestar_vite-0.1.4/litestar_vite/py.typed +0 -0
- litestar_vite-0.1.4/litestar_vite/template_engine.py +85 -0
- litestar_vite-0.1.4/litestar_vite/templates/__init__.py +0 -0
- litestar_vite-0.1.4/litestar_vite/templates/init/htmx/main.css.j2 +0 -0
- litestar_vite-0.1.4/litestar_vite/templates/init/htmx/main.js.j2 +1 -0
- litestar_vite-0.1.4/litestar_vite/templates/init/index.html.j2 +18 -0
- litestar_vite-0.1.4/litestar_vite/templates/init/package.json.j2 +10 -0
- litestar_vite-0.1.4/litestar_vite/templates/init/react/App.tsx.j2 +9 -0
- litestar_vite-0.1.4/litestar_vite/templates/init/react/main.tsx.j2 +9 -0
- litestar_vite-0.1.4/litestar_vite/templates/init/tailwindcss/main.css.j2 +3 -0
- litestar_vite-0.1.4/litestar_vite/templates/init/tailwindcss/postcss.config.ts.j2 +6 -0
- litestar_vite-0.1.4/litestar_vite/templates/init/tailwindcss/tailwind.config.js.j2 +9 -0
- litestar_vite-0.1.4/litestar_vite/templates/init/tsconfig.json.j2 +30 -0
- litestar_vite-0.1.4/litestar_vite/templates/init/vanilla/main.css.j2 +0 -0
- litestar_vite-0.1.4/litestar_vite/templates/init/vite.config.ts.j2 +27 -0
- litestar_vite-0.1.4/litestar_vite/templates/init/vue/App.vue.j2 +5 -0
- litestar_vite-0.1.4/litestar_vite/templates/init/vue/main.ts.j2 +0 -0
- {litestar_vite-0.1.2 → litestar_vite-0.1.4}/pdm.lock +522 -594
- {litestar_vite-0.1.2 → litestar_vite-0.1.4}/pyproject.toml +8 -2
- litestar_vite-0.1.4/tests/__init__.py +0 -0
- litestar_vite-0.1.2/litestar_vite/cli.py +0 -24
- litestar_vite-0.1.2/litestar_vite/template_engine.py +0 -104
- {litestar_vite-0.1.2 → litestar_vite-0.1.4}/.github/CODEOWNERS +0 -0
- {litestar_vite-0.1.2 → litestar_vite-0.1.4}/.github/workflows/cd.yaml +0 -0
- {litestar_vite-0.1.2 → litestar_vite-0.1.4}/.github/workflows/ci.yaml +0 -0
- {litestar_vite-0.1.2 → litestar_vite-0.1.4}/.github/workflows/docs-preview.yaml +0 -0
- {litestar_vite-0.1.2 → litestar_vite-0.1.4}/.github/workflows/docs.yaml +0 -0
- {litestar_vite-0.1.2 → litestar_vite-0.1.4}/.github/workflows/pr-title.yaml +0 -0
- {litestar_vite-0.1.2 → litestar_vite-0.1.4}/.github/workflows/publish.yaml +0 -0
- {litestar_vite-0.1.2 → litestar_vite-0.1.4}/CONTRIBUTING.rst +0 -0
- {litestar_vite-0.1.2 → litestar_vite-0.1.4}/LICENSE +0 -0
- {litestar_vite-0.1.2 → litestar_vite-0.1.4}/Makefile +0 -0
- {litestar_vite-0.1.2 → litestar_vite-0.1.4}/README.md +0 -0
- {litestar_vite-0.1.2 → litestar_vite-0.1.4}/docs/Makefile +0 -0
- {litestar_vite-0.1.2 → litestar_vite-0.1.4}/docs/conf.py +0 -0
- {litestar_vite-0.1.2 → litestar_vite-0.1.4}/docs/contribution-guide.rst +0 -0
- {litestar_vite-0.1.2 → litestar_vite-0.1.4}/docs/fix_missing_references.py +0 -0
- {litestar_vite-0.1.2 → litestar_vite-0.1.4}/docs/index.rst +0 -0
- {litestar_vite-0.1.2 → litestar_vite-0.1.4}/docs/reference/config.rst +0 -0
- {litestar_vite-0.1.2 → litestar_vite-0.1.4}/docs/reference/plugin.rst +0 -0
- {litestar_vite-0.1.2 → litestar_vite-0.1.4}/docs/usage/index.rst +0 -0
- {litestar_vite-0.1.2 → litestar_vite-0.1.4}/docs/usage/placeholder.rst +0 -0
- {litestar_vite-0.1.2/tests → litestar_vite-0.1.4/examples}/__init__.py +0 -0
- {litestar_vite-0.1.2 → litestar_vite-0.1.4}/litestar_vite/__init__.py +0 -0
- {litestar_vite-0.1.2 → litestar_vite-0.1.4}/litestar_vite/__metadata__.py +0 -0
- {litestar_vite-0.1.2 → litestar_vite-0.1.4}/tests/docker-compose.yml +0 -0
|
@@ -2,12 +2,12 @@ default_language_version:
|
|
|
2
2
|
python: "3.11"
|
|
3
3
|
repos:
|
|
4
4
|
- repo: https://github.com/compilerla/conventional-pre-commit
|
|
5
|
-
rev:
|
|
5
|
+
rev: v3.0.0
|
|
6
6
|
hooks:
|
|
7
7
|
- id: conventional-pre-commit
|
|
8
8
|
stages: [commit-msg]
|
|
9
9
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
10
|
-
rev: v4.
|
|
10
|
+
rev: v4.5.0
|
|
11
11
|
hooks:
|
|
12
12
|
- id: check-ast
|
|
13
13
|
- id: check-case-conflict
|
|
@@ -17,7 +17,7 @@ repos:
|
|
|
17
17
|
- id: mixed-line-ending
|
|
18
18
|
- id: trailing-whitespace
|
|
19
19
|
- repo: https://github.com/charliermarsh/ruff-pre-commit
|
|
20
|
-
rev: "v0.
|
|
20
|
+
rev: "v0.1.7"
|
|
21
21
|
hooks:
|
|
22
22
|
- id: ruff
|
|
23
23
|
args: ["--fix"]
|
|
@@ -27,12 +27,12 @@ repos:
|
|
|
27
27
|
hooks:
|
|
28
28
|
- id: codespell
|
|
29
29
|
- repo: https://github.com/psf/black
|
|
30
|
-
rev: 23.
|
|
30
|
+
rev: 23.11.0
|
|
31
31
|
hooks:
|
|
32
32
|
- id: black
|
|
33
33
|
args: [--config=./pyproject.toml]
|
|
34
34
|
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
35
|
-
rev: "v1.
|
|
35
|
+
rev: "v1.7.1"
|
|
36
36
|
hooks:
|
|
37
37
|
- id: mypy
|
|
38
38
|
exclude: "docs"
|
|
@@ -52,6 +52,6 @@ repos:
|
|
|
52
52
|
"litestar[cli]",
|
|
53
53
|
]
|
|
54
54
|
- repo: https://github.com/sphinx-contrib/sphinx-lint
|
|
55
|
-
rev: "v0.
|
|
55
|
+
rev: "v0.9.0"
|
|
56
56
|
hooks:
|
|
57
57
|
- id: sphinx-lint
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: litestar-vite
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.4
|
|
4
4
|
Summary: Vite plugin for Litestar
|
|
5
5
|
Project-URL: Changelog, https://cofin.github.io/litestar-vite/latest/changelog
|
|
6
6
|
Project-URL: Discord, https://discord.gg/X3FJqy8d2j
|
|
@@ -30,7 +30,9 @@ Classifier: Topic :: Database :: Database Engines/Servers
|
|
|
30
30
|
Classifier: Topic :: Software Development
|
|
31
31
|
Classifier: Typing :: Typed
|
|
32
32
|
Requires-Python: >=3.8
|
|
33
|
-
Requires-Dist: litestar[cli,jinja]>=2.0
|
|
33
|
+
Requires-Dist: litestar[cli,jinja]>=2.4.0
|
|
34
|
+
Provides-Extra: nodeenv
|
|
35
|
+
Requires-Dist: nodeenv; extra == 'nodeenv'
|
|
34
36
|
Description-Content-Type: text/markdown
|
|
35
37
|
|
|
36
38
|
# Litestar Vite
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from pathlib import Path
|
|
4
|
+
|
|
5
|
+
from litestar import Litestar
|
|
6
|
+
|
|
7
|
+
from litestar_vite import ViteConfig, VitePlugin
|
|
8
|
+
|
|
9
|
+
here = Path(__file__).parent
|
|
10
|
+
|
|
11
|
+
vite = VitePlugin(
|
|
12
|
+
config=ViteConfig(
|
|
13
|
+
bundle_dir=Path(here / "web" / "public"),
|
|
14
|
+
resource_dir=Path(here / "web" / "resources"),
|
|
15
|
+
assets_dir=Path(here / "web" / "resources" / "assets"),
|
|
16
|
+
templates_dir=Path(here / "web" / "templates"),
|
|
17
|
+
hot_reload=True,
|
|
18
|
+
),
|
|
19
|
+
)
|
|
20
|
+
app = Litestar(plugins=[vite])
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"private": true,
|
|
3
|
+
"type": "module",
|
|
4
|
+
"scripts": {
|
|
5
|
+
"dev": "vite",
|
|
6
|
+
"build": "vite build"
|
|
7
|
+
},
|
|
8
|
+
"dependencies": {
|
|
9
|
+
"htmx.org": "^1.9.6"
|
|
10
|
+
},
|
|
11
|
+
"devDependencies": {
|
|
12
|
+
"axios": "^1.1.2",
|
|
13
|
+
"litestar-vite-plugin": "^0.1.0",
|
|
14
|
+
"typescript": "^4.9.5",
|
|
15
|
+
"autoprefixer": "^10.4.16",
|
|
16
|
+
"postcss": "^8.4.31",
|
|
17
|
+
"tailwindcss": "^3.3.5",
|
|
18
|
+
"vite": "^4.0.0"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ESNext",
|
|
4
|
+
"useDefineForClassFields": true,
|
|
5
|
+
"module": "ESNext",
|
|
6
|
+
"moduleResolution": "node",
|
|
7
|
+
"strict": true,
|
|
8
|
+
"jsx": "preserve",
|
|
9
|
+
"resolveJsonModule": true,
|
|
10
|
+
"isolatedModules": true,
|
|
11
|
+
"esModuleInterop": true,
|
|
12
|
+
"lib": ["ESNext", "DOM"],
|
|
13
|
+
"skipLibCheck": true,
|
|
14
|
+
"noEmit": true,
|
|
15
|
+
"composite": true,
|
|
16
|
+
"allowSyntheticDefaultImports": true,
|
|
17
|
+
"baseUrl": "resources",
|
|
18
|
+
"paths": {
|
|
19
|
+
"@/*": ["./*"]
|
|
20
|
+
},
|
|
21
|
+
"types": ["vite/client", "node"]
|
|
22
|
+
},
|
|
23
|
+
"include": [
|
|
24
|
+
"**/*.d.ts",
|
|
25
|
+
"resources/**/*.js" ,
|
|
26
|
+
"resources/**/*.ts" ,
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
"vite.config.ts"
|
|
30
|
+
]
|
|
31
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { defineConfig } from "vite";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
import litestar from "litestar-vite-plugin";
|
|
5
|
+
|
|
6
|
+
export default defineConfig({
|
|
7
|
+
plugins: [
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
litestar({
|
|
11
|
+
input: [
|
|
12
|
+
"resources/styles.css"
|
|
13
|
+
],
|
|
14
|
+
assetUrl: "/static/",
|
|
15
|
+
assetDirectory: "resources/assets",
|
|
16
|
+
bundleDirectory: "public",
|
|
17
|
+
resourceDirectory: "resources"
|
|
18
|
+
}),
|
|
19
|
+
],
|
|
20
|
+
resolve: {
|
|
21
|
+
alias: {
|
|
22
|
+
"@": "resources",
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from pathlib import Path
|
|
4
|
+
|
|
5
|
+
from litestar import Litestar
|
|
6
|
+
|
|
7
|
+
from litestar_vite import ViteConfig, VitePlugin
|
|
8
|
+
|
|
9
|
+
here = Path(__file__).parent
|
|
10
|
+
|
|
11
|
+
vite = VitePlugin(
|
|
12
|
+
config=ViteConfig(
|
|
13
|
+
bundle_dir=Path(here / "web" / "public"),
|
|
14
|
+
resource_dir=Path(here / "web" / "resources"),
|
|
15
|
+
assets_dir=Path(here / "web" / "resources" / "assets"),
|
|
16
|
+
templates_dir=Path(here / "web" / "templates"),
|
|
17
|
+
hot_reload=True,
|
|
18
|
+
),
|
|
19
|
+
)
|
|
20
|
+
app = Litestar(plugins=[vite])
|
|
File without changes
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from pathlib import Path
|
|
4
|
+
|
|
5
|
+
from litestar import Litestar
|
|
6
|
+
from web.controllers import WebController
|
|
7
|
+
|
|
8
|
+
from litestar_vite import ViteConfig, VitePlugin
|
|
9
|
+
|
|
10
|
+
here = Path(__file__).parent
|
|
11
|
+
|
|
12
|
+
vite = VitePlugin(
|
|
13
|
+
config=ViteConfig(
|
|
14
|
+
bundle_dir=Path(here / "web" / "public"),
|
|
15
|
+
resource_dir=Path(here / "web" / "resources"),
|
|
16
|
+
assets_dir=Path(here / "web" / "resources" / "assets"),
|
|
17
|
+
templates_dir=Path(here / "web" / "templates"),
|
|
18
|
+
hot_reload=True,
|
|
19
|
+
port=3006,
|
|
20
|
+
),
|
|
21
|
+
)
|
|
22
|
+
app = Litestar(plugins=[vite], route_handlers=[WebController])
|