-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor to htmx and _hyperscript (#4)
- Loading branch information
1 parent
5ed4381
commit aec2f46
Showing
59 changed files
with
1,390 additions
and
4,457 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[build] | ||
rustflags = ["-C", "link-arg=-fuse-ld=lld"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
edition = "2021" | ||
group_imports = "StdExternalCrate" | ||
imports_granularity = "Module" | ||
imports_layout = "HorizontalVertical" | ||
reorder_impl_items = true | ||
reorder_imports = true | ||
reorder_modules = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,22 +3,17 @@ FROM mcr.microsoft.com/devcontainers/rust:1-bookworm | |
# Include lld linker to improve build times either by using environment variable | ||
# RUSTFLAGS="-C link-arg=-fuse-ld=lld" or with Cargo's configuration file (i.e see .cargo/config.toml). | ||
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ | ||
&& apt-get -y install clang lld \ | ||
&& apt-get autoremove -y && apt-get clean -y | ||
&& apt-get -y install clang lld \ | ||
&& apt-get autoremove -y && apt-get clean -y | ||
|
||
RUN rustup toolchain install nightly \ | ||
&& rustup default nightly \ | ||
&& rustup target add wasm32-unknown-unknown \ | ||
&& rustup component add rustfmt rust-docs clippy | ||
RUN rustup component add rustfmt rust-docs clippy | ||
|
||
RUN cargo install cargo-generate | ||
RUN cargo install cargo-leptos | ||
RUN cargo install leptosfmt | ||
RUN cargo install trunk --no-default-features --features native-tls | ||
RUN cargo install sqlx-cli --no-default-features --features native-tls,sqlite | ||
RUN cargo install cargo-watch | ||
|
||
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \ | ||
&& apt-get install -y nodejs | ||
&& apt-get install -y nodejs \ | ||
&& npm install -g [email protected] | ||
|
||
USER vscode | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,29 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the | ||
// README at: https://github.com/devcontainers/templates/tree/main/src/rust-postgres | ||
{ | ||
"name": "lokai", | ||
"dockerComposeFile": "docker-compose.yml", | ||
"service": "app", | ||
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", | ||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
// "forwardPorts": [], | ||
// Use 'postCreateCommand' to run commands after the container is created. | ||
// "postCreateCommand": "rustc --version", | ||
// Configure tool-specific properties. | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"bradlc.vscode-tailwindcss", | ||
"esbenp.prettier-vscode", | ||
"mtxr.sqltools", | ||
"mtxr.sqltools-driver-sqlite", | ||
"tabbyml.vscode-tabby" | ||
] | ||
} | ||
} | ||
// Features to add to the dev container. More info: https://containers.dev/features. | ||
// "features": {} | ||
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. | ||
// "remoteUser": "root" | ||
"name": "lokai", | ||
"dockerComposeFile": "docker-compose.yml", | ||
"service": "app", | ||
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", | ||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
// "forwardPorts": [], | ||
// Use 'postCreateCommand' to run commands after the container is created. | ||
// "postCreateCommand": "rustc --version", | ||
// Configure tool-specific properties. | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"bradlc.vscode-tailwindcss", | ||
"esbenp.prettier-vscode", | ||
"mtxr.sqltools", | ||
"mtxr.sqltools-driver-sqlite", | ||
"oderwat.indent-rainbow", | ||
"tabbyml.vscode-tabby" | ||
] | ||
} | ||
} | ||
// Features to add to the dev container. More info: https://containers.dev/features. | ||
// "features": {} | ||
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. | ||
// "remoteUser": "root" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
version: '3.8' | ||
version: "3.8" | ||
|
||
services: | ||
app: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
env_file: | ||
# Ensure that the variables in .env match the same variables in devcontainer.json | ||
- ../.env | ||
volumes: | ||
- ../..:/workspaces:cached | ||
# Overrides default command so things don't shut down after the process ends. | ||
command: sleep infinity | ||
app: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
env_file: | ||
# Ensure that the variables in .env match the same variables in devcontainer.json | ||
- ../.env | ||
volumes: | ||
- ../..:/workspaces:cached | ||
# Overrides default command so things don't shut down after the process ends. | ||
command: sleep infinity |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
DATABASE_URL=sqlite://db.sqlite3 | ||
LEPTOS_TAILWIND_VERSION=v3.4.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,94 +1,105 @@ | ||
{ | ||
"[javascript]": { | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll": "always", | ||
"source.organizeImports": "always" | ||
}, | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.formatOnSave": true | ||
}, | ||
"[json]": { | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll": "always", | ||
"source.organizeImports": "always" | ||
}, | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.formatOnSave": true | ||
}, | ||
"[jsonc]": { | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll": "always", | ||
"source.organizeImports": "always" | ||
}, | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.formatOnSave": true | ||
}, | ||
"[rust]": { | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll": "explicit", | ||
"source.organizeImports": "always" | ||
}, | ||
"editor.defaultFormatter": "rust-lang.rust-analyzer", | ||
"editor.formatOnSave": true | ||
}, | ||
"[sql]": { | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll": "always", | ||
"source.organizeImports": "always" | ||
}, | ||
"editor.formatOnSave": true | ||
}, | ||
"[toml]": { | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll": "always", | ||
"source.organizeImports": "always" | ||
}, | ||
"editor.defaultFormatter": "tamasfe.even-better-toml", | ||
"editor.formatOnSave": true | ||
}, | ||
"[markdown]": { | ||
"editor.formatOnSave": true | ||
}, | ||
"editor.detectIndentation": false, | ||
"editor.indentSize": "tabSize", | ||
"editor.quickSuggestions": { | ||
"strings": "on" | ||
}, | ||
"editor.renderFinalNewline": "dimmed", | ||
"editor.renderLineHighlight": "all", | ||
"editor.renderWhitespace": "all", | ||
"editor.tabSize": 4, | ||
"files.associations": { | ||
"*.css": "tailwindcss" | ||
}, | ||
"prettier.tabWidth": 4, | ||
"prettier.trailingComma": "es5", | ||
"prettier.useTabs": true, | ||
"rust-analyzer.cargo.features": ["hydrate", "ssr"], | ||
"rust-analyzer.procMacro.ignored": { | ||
"leptos_macro": ["server"] | ||
}, | ||
"rust-analyzer.rustfmt.overrideCommand": [ | ||
"leptosfmt", | ||
"--stdin", | ||
"--rustfmt" | ||
], | ||
"rust-analyzer.showUnlinkedFileNotification": false, | ||
"sqltools.connections": [ | ||
{ | ||
"database": "db.sqlite3", | ||
"driver": "SQLite", | ||
"name": "localhost", | ||
"previewLimit": 50 | ||
} | ||
], | ||
"sqltools.useNodeRuntime": true, | ||
"tabby.api.endpoint": "http://host.docker.internal:8080", | ||
"tabby.inlineCompletion.triggerMode": "automatic", | ||
"tabby.usage.anonymousUsageTracking": true, | ||
"tailwindCSS.experimental.classRegex": ["class: \"(.*)\""], | ||
"tailwindCSS.includeLanguages": { | ||
"rust": "html" | ||
}, | ||
"workbench.editor.highlightModifiedTabs": true | ||
"[dockercompose]": { | ||
"editor.formatOnSave": true, | ||
"editor.tabSize": 4 | ||
}, | ||
"[dockerfile]": { | ||
"editor.formatOnSave": true | ||
}, | ||
"[html]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.formatOnSave": true | ||
}, | ||
"[javascript]": { | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll": "always", | ||
"source.organizeImports": "always" | ||
}, | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.formatOnSave": true | ||
}, | ||
"[json]": { | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll": "always", | ||
"source.organizeImports": "always" | ||
}, | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.formatOnSave": true | ||
}, | ||
"[jsonc]": { | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll": "always", | ||
"source.organizeImports": "always" | ||
}, | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.formatOnSave": true | ||
}, | ||
"[markdown]": { | ||
"editor.formatOnSave": true | ||
}, | ||
"[rust]": { | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll": "explicit", | ||
"source.organizeImports": "always" | ||
}, | ||
"editor.defaultFormatter": "rust-lang.rust-analyzer", | ||
"editor.formatOnSave": true | ||
}, | ||
"[sql]": { | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll": "always", | ||
"source.organizeImports": "always" | ||
}, | ||
"editor.formatOnSave": true | ||
}, | ||
"[tailwindcss]": { | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll": "always", | ||
"source.organizeImports": "always" | ||
}, | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.formatOnSave": true | ||
}, | ||
"[toml]": { | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll": "always", | ||
"source.organizeImports": "always" | ||
}, | ||
"editor.defaultFormatter": "tamasfe.even-better-toml", | ||
"editor.formatOnSave": true | ||
}, | ||
"editor.detectIndentation": false, | ||
"editor.indentSize": "tabSize", | ||
"editor.quickSuggestions": { | ||
"strings": "on" | ||
}, | ||
"editor.renderFinalNewline": "dimmed", | ||
"editor.renderLineHighlight": "all", | ||
"editor.renderWhitespace": "all", | ||
"editor.tabSize": 4, | ||
"files.associations": { | ||
"*.css": "tailwindcss" | ||
}, | ||
"files.trimTrailingWhitespace": true, | ||
"prettier.tabWidth": 4, | ||
"prettier.trailingComma": "es5", | ||
"prettier.useTabs": false, | ||
"rust-analyzer.showUnlinkedFileNotification": false, | ||
"sqltools.connections": [ | ||
{ | ||
"database": "db.sqlite3", | ||
"driver": "SQLite", | ||
"name": "localhost", | ||
"previewLimit": 50 | ||
} | ||
], | ||
"sqltools.useNodeRuntime": true, | ||
"tabby.api.endpoint": "http://host.docker.internal:8080", | ||
"tabby.inlineCompletion.triggerMode": "automatic", | ||
"tabby.usage.anonymousUsageTracking": true, | ||
"tailwindCSS.experimental.classRegex": ["class: \"(.*)\""], | ||
"tailwindCSS.includeLanguages": { | ||
"rust": "html" | ||
}, | ||
"workbench.editor.highlightModifiedTabs": true | ||
} |
Oops, something went wrong.