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

devex: npm -> bun #115

Closed
wants to merge 5 commits into from
Closed
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
6 changes: 3 additions & 3 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Bun
uses: oven-sh/setup-bun@v2

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20"

- name: Get dependencies
run: npm ci

- name: Run pocketbase-typegen
run: make pb_types

Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/firebase-hosting-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ jobs:
FIREBASE_CLI_EXPERIMENTS: webframeworks
steps:
- uses: actions/checkout@v4
- run: npm ci && make build
- uses: FirebaseExtended/action-hosting-deploy@v0
- uses: oven-sh/setup-bun@v2
- run: make build
- uses: Kaffe-diem/action-hosting-deploy
with:
repoToken: ${{ secrets.GITHUB_TOKEN }}
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_KAFFE_DIEM }}
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/firebase-hosting-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ jobs:
FIREBASE_CLI_EXPERIMENTS: webframeworks
steps:
- uses: actions/checkout@v4
- run: npm ci && make build
- uses: FirebaseExtended/action-hosting-deploy@v0
- uses: oven-sh/setup-bun@v2
- run: make build
- uses: Kaffe-diem/action-hosting-deploy
with:
repoToken: ${{ secrets.GITHUB_TOKEN }}
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_KAFFE_DIEM }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pocketbase-typegen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Bun
uses: oven-sh/setup-bun@v2

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20"

- name: Install dependencies
run: npm ci

- name: Generate types
env:
PUBLIC_PB_HOST: ${{ vars.PB_HOST }}
Expand Down
4 changes: 0 additions & 4 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
# Package Managers
package-lock.json
pnpm-lock.yaml
yarn.lock
# Generated files
src/lib/pocketbase/index.d.ts
1,176 changes: 1,176 additions & 0 deletions bun.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
# Plantuml
plantuml
# JS
nodejs_20
nodePackages.npm
(nodejs_20.override { enableNpm = false; })
bun
nodePackages.typescript-language-server
nodePackages.typescript
emmet-ls
Expand Down
29 changes: 16 additions & 13 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,26 @@

default: dev

dev: pb_types
npx vite dev
dev: pb_types dependencies
bun run vite dev

build: pb_types
npx vite build
build: pb_types dependencies
bun run vite build

db:
docker compose up

pb_types:
@npx pocketbase-typegen --url $(PUBLIC_PB_HOST) --email $(PB_ADMIN_EMAIL) --password $(PB_ADMIN_PASSWORD) --out ./src/lib/pocketbase/index.d.ts
pb_types: dependencies
@bun run pocketbase-typegen --url $(PUBLIC_PB_HOST) --email $(PB_ADMIN_EMAIL) --password $(PB_ADMIN_PASSWORD) --out ./src/lib/pocketbase/index.d.ts

format:
npx prettier --write .
format: dependencies
bun run prettier --write .

lint:
npx prettier --check .
npx svelte-kit sync
npx svelte-check --tsconfig ./tsconfig.json
npx eslint src
lint: dependencies
bun run prettier --check .
bun run svelte-kit sync
bun run svelte-check --tsconfig ./tsconfig.json
bun run eslint src

dependencies:
bun install
Loading