Skip to content
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
10 changes: 6 additions & 4 deletions .github/workflows/build-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@ jobs:
uses: actions/checkout@v6

# Install Node.js and build Tailwind CSS
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: "24"
cache: "npm"
- name: Install npm dependencies
run: npm ci
cache: "pnpm"
- name: Install dependencies
run: pnpm install --frozen-lockfile

# Install toolchain
- name: Install Rust Toolchain
Expand All @@ -41,7 +43,7 @@ jobs:

# Build app
- name: Build static site
run: npm run build:web
run: pnpm build:web

# Upload artifact
- name: Fix permissions for artifact upload
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,20 @@ jobs:
steps:
- uses: actions/checkout@v6

- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v6
with:
node-version: "24"
cache: "npm"
- run: npm ci
cache: "pnpm"
- run: pnpm install --frozen-lockfile

- uses: dtolnay/rust-toolchain@stable
- uses: taiki-e/install-action@v2
with:
tool: dioxus-cli

- name: Check formatting
run: npm run format:check
run: pnpm format:check

clippy:
name: Clippy
Expand Down Expand Up @@ -56,11 +57,12 @@ jobs:
steps:
- uses: actions/checkout@v6

- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v6
with:
node-version: "24"
cache: "npm"
- run: npm ci
cache: "pnpm"
- run: pnpm install --frozen-lockfile

- uses: dtolnay/rust-toolchain@stable
with:
Expand All @@ -71,4 +73,4 @@ jobs:
tool: dioxus-cli

- name: Build web
run: npm run build:web
run: pnpm build:web
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
npx lint-staged
pnpm exec lint-staged
2 changes: 1 addition & 1 deletion .prettierignore → .oxfmtignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ target/
# Dependencies
node_modules/

# Rust files (handled by rustfmt)
# Rust files (handled by dx fmt)
*.rs
File renamed without changes.
2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"tamasfe.even-better-toml",
"dioxuslabs.dioxus",
"bradlc.vscode-tailwindcss",
"esbenp.prettier-vscode",
"oxc.oxc-vscode",
"editorconfig.editorconfig"
]
}
12 changes: 6 additions & 6 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,21 @@
"editor.defaultFormatter": "DioxusLabs.dioxus"
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "oxc.oxc-vscode"
},
"[css]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "oxc.oxc-vscode"
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "oxc.oxc-vscode"
},
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "oxc.oxc-vscode"
},
"[markdown]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "oxc.oxc-vscode"
},
"[yaml]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "oxc.oxc-vscode"
}
}
4 changes: 2 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ div { class: "widget-grid",
## Development

```bash
npm run serve:web # web with hot reload
npm run serve:desktop # desktop with hot reload
pnpm serve:web # web with hot reload
pnpm serve:desktop # desktop with hot reload
dx build --platform web --release # production build
```

Expand Down
21 changes: 18 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@ cidr = "0.3.2"
color_processing = "0.6"
digest = "0.11"
dioxus = { version = "0.7.6", features = ["router", "logger"] }
dioxus-free-icons = { version = "0.10.0", features = ["bootstrap", "font-awesome-solid", "font-awesome-brands", "font-awesome-regular"] }
dioxus-free-icons = { version = "0.10.0", features = [
"bootstrap",
"font-awesome-solid",
"font-awesome-brands",
"font-awesome-regular",
] }
dioxus-sdk = { version = "0.7", features = ["storage"] }
getrandom_02 = { package = "getrandom", version = "0.2", optional = true }
getrandom = "0.3"
Expand All @@ -37,7 +42,17 @@ wasm-bindgen = { version = "0.2.100", features = ["enable-interning"], optional

[features]
desktop = ["dioxus/desktop"]
web = ["dioxus/web", "getrandom/wasm_js", "getrandom_02/js", "dep:getrandom_02", "getrandom_04/wasm_js", "dep:getrandom_04", "time/wasm-bindgen", "uuid/js", "dep:wasm-bindgen"]
web = [
"dioxus/web",
"getrandom/wasm_js",
"getrandom_02/js",
"dep:getrandom_02",
"getrandom_04/wasm_js",
"dep:getrandom_04",
"time/wasm-bindgen",
"uuid/js",
"dep:wasm-bindgen",
]

default = ["desktop"]

Expand All @@ -57,7 +72,7 @@ inherits = "dev"
inherits = "dev"

[target.'cfg(not(any(target_os = "windows", target_os = "none")))'.profile.release]
strip = true # Automatically strip symbols from the binary. Only available for *nix targets.
strip = true # Automatically strip symbols from the binary. Only available for *nix targets.

[package.metadata.bundle]
name = "Dev Widgets"
Expand Down
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,13 @@ git clone https://github.com/esimkowitz/dev-widgets.git
cd dev-widgets
```

### 4. Install npm dependencies
### 4. Install pnpm dependencies

[pnpm](https://pnpm.io/) is the package manager. The repo pins its version via the `packageManager` field in `package.json` and [Corepack](https://nodejs.org/api/corepack.html), so enable Corepack once and `pnpm` will pick up the right version automatically:

```bash
npm install
corepack enable
pnpm install
```

## Web App
Expand All @@ -73,7 +76,7 @@ Dev Widgets is hosted at <https://widgets.fyi>, automatically deployed from the
### Run locally

```bash
npm run serve:web
pnpm serve:web
```

This compiles TailwindCSS with a file watcher and then starts the Dioxus dev server and runs the web app with hot-reloading enabled.
Expand All @@ -83,7 +86,7 @@ This compiles TailwindCSS with a file watcher and then starts the Dioxus dev ser
This compiles the TailwindCSS and builds the web app as a single-page app for release to static hosting like GitHub Pages.

```bash
npm run build:web
pnpm build:web
```

## Desktop App
Expand All @@ -93,7 +96,7 @@ Dev Widgets also runs as a native desktop app via Tauri. Validated on macOS and
### Run desktop app locally

```bash
npm run serve:desktop
pnpm serve:desktop
```

This compiles TailwindCSS with a file watcher and then starts the Dioxus dev server and runs the desktop app with hot-reloading enabled.
Expand All @@ -103,7 +106,7 @@ This compiles TailwindCSS with a file watcher and then starts the Dioxus dev ser
This compiles the TailwindCSS and builds the desktop app for release.

```bash
npm run build:desktop
pnpm build:desktop
```

## Roadmap
Expand Down
Loading
Loading