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

feat(bun): Switch to use bun #400

Merged
merged 4 commits into from
Feb 3, 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
60 changes: 16 additions & 44 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,12 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PNPM
uses: pnpm/action-setup@v2
with:
version: 8
- name: Setup Node lts/*
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: 'pnpm'
- name: Setup Bun
uses: oven-sh/setup-bun@v1
- name: Install dependencies
run: pnpm install
run: bun install
- name: Prettier
run: npm run format:check
run: bun --bun run format:check
eslint:
name: ESLint
runs-on: ubuntu-latest
Expand All @@ -38,19 +31,12 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PNPM
uses: pnpm/action-setup@v2
with:
version: 8
- name: Setup Node lts/*
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: 'pnpm'
- name: Setup Bun
uses: oven-sh/setup-bun@v1
- name: Install dependencies
run: pnpm install
run: bun install
- name: ESLint
run: npm run lint:eslint
run: bun --bun run lint:eslint
svelte-check:
name: Svelte Check
runs-on: ubuntu-latest
Expand All @@ -60,19 +46,12 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PNPM
uses: pnpm/action-setup@v2
with:
version: 8
- name: Setup Node lts/*
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: 'pnpm'
- name: Setup Bun
uses: oven-sh/setup-bun@v1
- name: Install dependencies
run: pnpm install
run: bun install
- name: Svelte Check
run: npm run check:ci
run: bun --bun run check:ci
build:
name: Build
runs-on: ubuntu-latest
Expand All @@ -83,19 +62,12 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PNPM
uses: pnpm/action-setup@v2
with:
version: 8
- name: Setup Node lts/*
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: 'pnpm'
- name: Setup Bun
uses: oven-sh/setup-bun@v1
- name: Install dependencies
run: pnpm install
run: bun install
- name: Build
run: npm run build:ci
run: bun --bun run build:ci
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
Expand Down
Binary file added bun.lockb
Binary file not shown.
15 changes: 9 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
"name": "personal-website",
"version": "0.0.1",
"private": true,
"engines": {
"bun": "^1.0.0"
},
"scripts": {
"dev": "vite dev",
"build": "vite build",
Expand All @@ -10,10 +13,10 @@
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:ci": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --output machine --fail-on-warnings",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"test:unit": "vitest",
"test:unit": "bun test",
"lint": "prettier --plugin-search-dir . --check . && eslint .",
"lint:eslint": "eslint .",
"format": "prettier . --write . --cache",
"format": "prettier --write . --cache",
"format:check": "prettier --plugin-search-dir . --check ."
},
"devDependencies": {
Expand All @@ -24,7 +27,7 @@
"@sveltejs/enhanced-img": "^0.1.8",
"@sveltejs/kit": "^2.3.5",
"@sveltejs/vite-plugin-svelte": "^3.0.1",
"@types/node": "^20.11.5",
"@types/bun": "^1.0.4",
"@types/serviceworker": "^0.0.82",
"@typescript-eslint/eslint-plugin": "^6.19.0",
"@typescript-eslint/parser": "^6.19.0",
Expand All @@ -44,12 +47,12 @@
"tslib": "^2.6.2",
"typescript": "^5.3.3",
"vite": "^5.0.11",
"vite-plugin-tailwind-purgecss": "^0.2.0",
"vitest": "^1.2.1"
"vite-plugin-tailwind-purgecss": "0.2.0"
},
"type": "module",
"dependencies": {
"@skeletonlabs/skeleton": "^2.7.1",
"@skeletonlabs/tw-plugin": "^0.3.1"
}
},
"module": "index.ts"
}
Loading