Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tailwind Rewrite #14

Merged
merged 10 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 4 additions & 10 deletions .github/workflows/deploy-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,18 @@ jobs:
with:
fetch-depth: 0 # Not needed if lastUpdated is not enabled

- uses: pnpm/action-setup@v4
- uses: denoland/setup-deno@v2
with:
version: 9

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
deno-version: v2.x

- name: Setup Pages
uses: actions/configure-pages@v5

- name: Install dependencies
run: pnpm install
run: deno install

- name: Build with VitePress
run: pnpm docs:build
run: deno task docs:build

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/rust.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: denoland/setup-deno@v2
with:
deno-version: v2.x

- name: Cache
uses: actions/cache@v4
with:
Expand Down
49 changes: 5 additions & 44 deletions .github/workflows/web.yaml
Original file line number Diff line number Diff line change
@@ -1,64 +1,25 @@
name: Web
on:
pull_request:
push:
branches:
- main

jobs:
build:
name: Build Typescript
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
with:
version: 9

- name: Install dependencies
working-directory: rhombus
run: |
pnpm install

- name: Build
working-directory: rhombus
run: |
pnpm build-js

tailwindcss:
name: Build TailwindCSS
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
with:
version: 9

- name: Install dependencies
working-directory: rhombus
run: |
pnpm install

- name: Build
working-directory: rhombus
run: |
pnpm build-tailwind

format:
name: Check Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
- uses: denoland/setup-deno@v2
with:
version: 9
deno-version: v2.x

- name: Install dependencies
run: |
pnpm install
deno install

- name: Check formatting
run: |
pnpm check-format
deno task check-format
9 changes: 9 additions & 0 deletions .helix/languages.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@ auto-format = true
name = "css"
language-servers = ["vscode-css-language-server", "tailwindcss-ls"]

[language-server.deno-language-server]
command = "deno"
args = ["lsp"]

[[language]]
name = "typescript"
file-types = ["ts", "tsx"]
language-servers = ["deno-language-server"]

[language-server.tailwindcss-ls]
config = { userLanguages = { jinja = "html" } }

Expand Down
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"plugins": ["prettier-plugin-jinja-template"],
"plugins": ["prettier-plugin-jinja-template", "prettier-plugin-tailwindcss"],
"overrides": [
{
"files": ["*.html"],
Expand Down
8 changes: 8 additions & 0 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
resolver = "2"
members = [
"rhombus",
"rhombus-build",
"rhombus-cli",
"examples/standalone",
"examples/plugin",
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ COPY . .
RUN cargo chef prepare --recipe-path recipe.json

FROM chef AS builder
COPY --from=denoland/deno:bin-2.1.3 /deno /usr/local/bin/deno
COPY --from=planner /app/recipe.json recipe.json
RUN cargo chef cook --release --recipe-path recipe.json
RUN cargo chef cook --release -p demo --recipe-path recipe.json
COPY . .
RUN cargo build --release --bin demo

Expand Down
36 changes: 4 additions & 32 deletions Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,46 +2,18 @@ version: "3"

tasks:
dev:
deps:
- watch-standalone
- watch-tailwindcss
- watch-clientjs
desc: Run cargo watch and tailwindcss concurrently

watch-standalone:
desc: Start cargo watch
desc: Watch the standalone example
dir: examples/standalone
cmds:
- mold -run cargo watch -x 'run -p standalone'

watch-demo:
desc: Start cargo watch
demo:
desc: Watch the demo
dir: examples/demo
cmds:
- mold -run cargo watch -x run

watch-standalone-release:
desc: Start cargo watch
cmds:
- mold -run cargo watch -x 'run -p standalone --release'
- mold -run cargo watch -x 'run -p demo'

watch-standalone-systemfd:
desc: Start cargo watch using systemfd to not drop connections on restart
cmds:
- systemfd --no-pid -s http::3000 -- mold -run cargo watch -x 'run -p standalone'

watch-tailwindcss:
desc: Start Tailwind CSS in watch mode
dir: rhombus
silent: true
cmds:
- tailwindcss --input app.css -w -o static/tailwind.css

watch-clientjs:
desc: Build the client js bundle in watch mode
dir: rhombus
silent: true
env:
WATCH: true
cmds:
- node build.mjs
Loading
Loading