Skip to content

Commit

Permalink
use bun
Browse files Browse the repository at this point in the history
  • Loading branch information
zaknesler committed Jul 23, 2024
1 parent 0b5bfae commit f71ef7a
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 3,590 deletions.
36 changes: 7 additions & 29 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on: [workflow_dispatch, workflow_call, pull_request]
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
NODE_VERSION: 21.x
DATABASE_URL: sqlite:blend.db

jobs:
Expand Down Expand Up @@ -45,29 +44,8 @@ jobs:
with:
version: latest

- name: Install Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}

- name: Install pnpm
uses: pnpm/action-setup@v3
id: pnpm-install
with:
version: 9
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT

- name: Configure pnpm cache
uses: actions/cache@v4
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ matrix.target }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: ${{ matrix.target }}-pnpm-store-
- name: Install Bun
uses: oven-sh/setup-bun@v2

- name: Create empty dist directory
shell: bash
Expand Down Expand Up @@ -99,12 +77,12 @@ jobs:
- run: cross test --verbose --workspace --target ${{ matrix.target }}
if: matrix.command == 'cross'

- run: pnpm install
- run: pnpm run ci
- run: bun install
- run: bun run ci
if: matrix.target == 'x86_64-unknown-linux-gnu'
- run: pnpm run typeshare:generate
- run: pnpm run test:cov
- run: pnpm run build
- run: bun run typeshare:generate
- run: bun run test
- run: bun run build

- run: ${{ matrix.command }} build --verbose --locked --release --target ${{ matrix.target }}

Expand Down
36 changes: 7 additions & 29 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
NODE_VERSION: 21.x
DATABASE_URL: sqlite:blend.db

jobs:
Expand All @@ -29,29 +28,8 @@ jobs:
with:
version: latest

- name: Install Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}

- name: Install pnpm
uses: pnpm/action-setup@v3
id: pnpm-install
with:
version: 9
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT

- name: Configure pnpm cache
uses: actions/cache@v4
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ matrix.target }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: ${{ matrix.target }}-pnpm-store-
- name: Install Bun
uses: oven-sh/setup-bun@v2

- name: Create empty dist directory
run: mkdir $GITHUB_WORKSPACE/ui/dist
Expand All @@ -75,8 +53,8 @@ jobs:
- run: sqlx migrate run --source crates/blend-db/migrations
- run: cargo test --verbose --workspace

- run: pnpm install
- run: pnpm run ci
- run: pnpm run typeshare:generate
- run: pnpm run test:cov
- run: pnpm run build
- run: bun install
- run: bun run ci
- run: bun run typeshare:generate
- run: bun run test
- run: bun run build
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{
"name": "blend-ui",
"type": "module",
"version": "0.0.0",
"author": "Zak Nesler <zak@nesler.dev> (https://nesler.dev)",
"packageManager": "bun@1.1.20",
"engines": { "node": ">=18" },

"scripts": {
"dev": "vite ui",
"build": "vite build ui",
Expand All @@ -10,7 +15,6 @@
"lint:fix": "biome check --write ./ui/src",
"test": "vitest run --root ui",
"test:watch": "vitest watch --root ui",
"test:cov": "vitest run --root ui --coverage",
"watch": "mprocs \"bun run dev\" \"cargo watch -x \\\"run -- start\\\"\"",
"watch:trace": "mprocs \"bun run dev\" \"cargo watch -x \\\"run -- -ltrace start\\\"\"",
"typeshare:generate": "typeshare ./ --lang typescript --output-file ./ui/src/types/bindings.ts && biome check --write ./ui/src/types/bindings.ts"
Expand Down Expand Up @@ -39,7 +43,6 @@
"@tailwindcss/forms": "^0.5.7",
"@tailwindcss/typography": "^0.5.13",
"@total-typescript/ts-reset": "^0.5.1",
"@vitest/coverage-v8": "^2.0.4",
"autoprefixer": "^10.4.19",
"postcss": "^8.4.39",
"solid-devtools": "^0.30.1",
Expand All @@ -49,8 +52,5 @@
"vite-plugin-solid": "^2.10.2",
"vite-tsconfig-paths": "^4.3.2",
"vitest": "^2.0.4"
},
"engines": {
"node": ">=18"
}
}
Loading

0 comments on commit f71ef7a

Please sign in to comment.