Skip to content

Commit 0a9abe3

Browse files
Merge pull request #25 from su-its/feat/front/bun-to-yarn-migration
chore: bun -> yarn
2 parents 76c47f5 + e2e84ed commit 0a9abe3

File tree

10 files changed

+6408
-29
lines changed

10 files changed

+6408
-29
lines changed

.github/workflows/build-app.yml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,22 @@ jobs:
2626
contents: read
2727
steps:
2828
- uses: actions/checkout@v4
29-
- uses: ./.github/actions/prepare-nodemodules
29+
30+
# Corepack enable をしておけば package.json の packageManager を読んで適切なバージョンの yarn を使ってくれる。
31+
# ただし非公式な方法であり、あくまでワークアラウンド。
32+
# https://github.com/actions/setup-node/issues/480#issuecomment-1820622085
33+
# > enable corepack **before** setup-node.
34+
- name: Enable Corepack
35+
run: corepack enable
36+
37+
- uses: actions/setup-node@v4
3038
with:
31-
root: ${{ github.workspace }}/typing-app
39+
node-version: '20'
40+
cache: 'yarn'
41+
cache-dependency-path: typing-app/yarn.lock
42+
43+
- name: Install Dependencies
44+
run: yarn
45+
3246
- name: Build Next.js Project
33-
run: npm run build
47+
run: yarn build

typing-app/.gitattributes

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/.yarn/** linguist-vendored
2+
/.yarn/releases/* binary
3+
/.yarn/plugins/**/* binary
4+
/.pnp.* binary linguist-generated

typing-app/.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
# dependencies
44
/node_modules
5+
.yarn/*
6+
!.yarn/patches
7+
!.yarn/plugins
8+
!.yarn/releases
9+
!.yarn/sdks
10+
!.yarn/versions
511
/.pnp
612
.pnp.js
713
.yarn/install-state.gz

typing-app/.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
engine-strict=true

typing-app/.yarnrc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodeLinker: node-modules

typing-app/bun.lockb

-225 KB
Binary file not shown.

typing-app/components.json

Lines changed: 0 additions & 17 deletions
This file was deleted.

typing-app/docs/get-started.md

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,13 @@ $ git clone https://github.com/su-its/typing.git
77
$ cd typing/typing-app
88
```
99

10-
## 2. パッケージのインストール(npm ではなく bun を採用しています)
11-
12-
### Bun をインストールする (まだインストールしていない場合)
13-
14-
```bash
15-
$ curl -fsSL https://bun.sh/install | bash
16-
```
10+
## 2. パッケージのインストール(npm ではなく yarn を採用しています)
1711

1812
### プロジェクトの依存パッケージをインストール(typing-app ディレクトリで実行)
1913

2014
```bash
21-
$ bun install
15+
$ corepack enable yarn
16+
$ yarn
2217
```
2318

2419
## 3. API & DB の起動(typing-server ディレクトリで実行)
@@ -30,5 +25,5 @@ $ docker-compose --file docker-compose.dev.yml up --build
3025
## 4. フロントエンドの起動(typing-app ディレクトリで実行)
3126

3227
```bash
33-
$ bun dev
28+
$ yarn dev
3429
```

typing-app/package.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,13 @@
1212
},
1313
"dependencies": {
1414
"@chakra-ui/react": "^2.8.2",
15+
"@emotion/react": "^11.11.4",
16+
"@emotion/styled": "^11.11.0",
1517
"@radix-ui/react-slot": "^1.0.2",
1618
"@radix-ui/react-toast": "^1.1.5",
1719
"class-variance-authority": "^0.7.0",
1820
"clsx": "^2.1.0",
21+
"framer-motion": "^11.0.20",
1922
"lucide-react": "^0.343.0",
2023
"next": "14.1.0",
2124
"react": "^18",
@@ -34,5 +37,11 @@
3437
"postcss": "^8",
3538
"tailwindcss": "^3.3.0",
3639
"typescript": "^5"
40+
},
41+
"repository": "https://github.com/su-its/typing",
42+
"author": "su-its",
43+
"packageManager": "[email protected]",
44+
"engines": {
45+
"npm": "use yarn instead"
3746
}
3847
}

0 commit comments

Comments
 (0)