Skip to content

Commit

Permalink
Merge pull request #328 from mkobayashime/bun
Browse files Browse the repository at this point in the history
Use Bun
  • Loading branch information
mkobayashime authored Oct 14, 2024
2 parents b55ef3f + 790b577 commit 13b115c
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 1,627 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
- uses: oven-sh/setup-bun@v2
with:
node-version: "lts/*"
cache: "pnpm"
bun-version: latest
- run: make node_modules
- run: make lint
- run: make typecheck
Expand All @@ -29,9 +27,8 @@ jobs:
FEED_ITEMS_NUMBER: 2
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
- uses: oven-sh/setup-bun@v2
with:
node-version: "lts/*"
bun-version: latest
- run: make node_modules
- run: make run
15 changes: 7 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
biome = pnpm exec biome
typecheck = pnpm exec tsc --noEmit
ts-node = pnpm exec tsx
biome = bunx biome
typecheck = bunx tsc --noEmit
ts-node = bunx tsx

node_modules: package.json pnpm-*.yaml
pnpm install
@touch node_modules
node_modules: PHONY
bun install

run: node_modules PHONY
$(ts-node) src/index.ts
bun run src/index.ts

lint: node_modules PHONY
$(biome) check .
Expand All @@ -22,6 +21,6 @@ typecheck.watch: node_modules PHONY
$(typecheck) --watch

clear: node_modules PHONY
pnpm exec rimraf dist
bunx rimraf dist

PHONY:
Binary file added bun.lockb
Binary file not shown.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"name": "twins-announcements",
"version": "1.0.0",
"main": "index.js",
"packageManager": "[email protected]+sha512.4abf725084d7bcbafbd728bfc7bee61f2f791f977fd87542b3579dcb23504d170d46337945e4c66485cd12d588a0c0e570ed9c477e7ccdd8507cf05f3f92eaca",
"author": "Masaki Kobayashi <[email protected]>",
"license": "MIT",
"private": true,
Expand All @@ -21,6 +20,6 @@
"typescript": "5.6.2"
},
"scripts": {
"preinstall": "npx only-allow pnpm"
"preinstall": "npx only-allow bun"
}
}
Loading

0 comments on commit 13b115c

Please sign in to comment.