File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- name : Formatter
1+ name : VP Format
22
33on :
44 pull_request :
55 branches :
66 - main
77 paths :
88 - ' app/**'
9- - ' server/api/**'
9+ - ' README.md'
10+ - ' server/**'
1011 - ' types/**'
12+ - ' package.json'
1113 - ' pnpm-workspace.yaml'
1214 - ' pnpm-lock.yaml'
15+ - ' vite.config.ts'
16+ - ' vitest.config.ts'
1317 - ' eslint.config.mjs'
1418 - ' nuxt.config.ts'
1519 - ' tsconfig.json'
20+ - ' server/tsconfig.json'
21+ - ' .github/workflows/format.yml'
1622
1723permissions :
18- contents : write
24+ contents : read
1925
2026jobs :
21- build :
27+ format :
2228 runs-on : ubuntu-latest
2329
24- strategy :
25- matrix :
26- node-version : [24.x]
27-
2830 steps :
2931 - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
30- - name : Install pnpm
31- uses : pnpm/action-setup@903f9c1a6ebcba6cf41d87230be49611ac97822e # v6.0.3
32- - name : Use Node.js ${{ matrix.node-version }}
33- uses : actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
32+ - name : Setup Vite+
33+ uses : voidzero-dev/setup-vp@be55d5df2da88a2387a2e6764871ca9e5387e187 # v1
3434 with :
35- node-version : ${{ matrix.node-version }}
36- cache : ' pnpm '
37- - name : pnpm install
38- run : pnpm install
39- - name : Format
40- run : pnpm run vp: fmt --check
35+ node-version : ' 24 '
36+ cache : true
37+ - name : Install dependencies
38+ run : vp install
39+ - name : Run vp fmt
40+ run : vp fmt . --check
4141 env :
4242 CI : true
Original file line number Diff line number Diff line change 1- name : Linter
1+ name : VP Lint
22
33on :
44 pull_request :
55 branches :
66 - main
77 paths :
88 - ' app/**'
9- - ' server/api/ **'
9+ - ' server/**'
1010 - ' types/**'
11+ - ' package.json'
1112 - ' pnpm-workspace.yaml'
1213 - ' pnpm-lock.yaml'
14+ - ' vite.config.ts'
15+ - ' vitest.config.ts'
1316 - ' eslint.config.mjs'
1417 - ' nuxt.config.ts'
1518 - ' tsconfig.json'
19+ - ' server/tsconfig.json'
20+ - ' .github/workflows/linter.yml'
1621
1722permissions :
18- contents : write
23+ contents : read
1924
2025jobs :
21- build :
26+ lint :
2227 runs-on : ubuntu-latest
2328
24- strategy :
25- matrix :
26- node-version : [24.x]
27-
2829 steps :
2930 - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
30- - name : Install pnpm
31- uses : pnpm/action-setup@903f9c1a6ebcba6cf41d87230be49611ac97822e # v6.0.3
32- - name : Use Node.js ${{ matrix.node-version }}
33- uses : actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
31+ - name : Setup Vite+
32+ uses : voidzero-dev/setup-vp@be55d5df2da88a2387a2e6764871ca9e5387e187 # v1
3433 with :
35- node-version : ${{ matrix.node-version }}
36- cache : ' pnpm '
37- - name : pnpm install
38- run : pnpm install
39- - name : Lint
40- run : pnpm run vp: lint
34+ node-version : ' 24 '
35+ cache : true
36+ - name : Install dependencies
37+ run : vp install
38+ - name : Run vp lint
39+ run : vp lint .
4140 env :
4241 CI : true
Original file line number Diff line number Diff line change 1+ name : VP Type Check
2+
3+ on :
4+ pull_request :
5+ branches :
6+ - main
7+ paths :
8+ - ' app/**'
9+ - ' server/**'
10+ - ' types/**'
11+ - ' package.json'
12+ - ' pnpm-workspace.yaml'
13+ - ' pnpm-lock.yaml'
14+ - ' vite.config.ts'
15+ - ' vitest.config.ts'
16+ - ' eslint.config.mjs'
17+ - ' nuxt.config.ts'
18+ - ' tsconfig.json'
19+ - ' server/tsconfig.json'
20+ - ' .github/workflows/typecheck.yml'
21+
22+ permissions :
23+ contents : read
24+
25+ jobs :
26+ typecheck :
27+ runs-on : ubuntu-latest
28+
29+ steps :
30+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
31+ - name : Setup Vite+
32+ uses : voidzero-dev/setup-vp@be55d5df2da88a2387a2e6764871ca9e5387e187 # v1
33+ with :
34+ node-version : ' 24'
35+ cache : true
36+ - name : Install dependencies
37+ run : vp install
38+ - name : Run vp check
39+ run : vp check
40+ env :
41+ CI : true
Original file line number Diff line number Diff line change 1- name : Vitest
1+ name : VP Test
22
33on :
44 pull_request :
55 branches :
66 - main
77 paths :
88 - ' app/**'
9- - ' server/api/ **'
9+ - ' server/**'
1010 - ' types/**'
1111 - ' package.json'
12+ - ' pnpm-workspace.yaml'
1213 - ' pnpm-lock.yaml'
14+ - ' vite.config.ts'
15+ - ' vitest.config.ts'
1316 - ' eslint.config.mjs'
1417 - ' nuxt.config.ts'
1518 - ' tsconfig.json'
19+ - ' server/tsconfig.json'
20+ - ' .github/workflows/vitest.yml'
1621
1722permissions :
1823 contents : read
@@ -21,22 +26,16 @@ jobs:
2126 test :
2227 runs-on : ubuntu-latest
2328
24- strategy :
25- matrix :
26- node-version : [24.x]
27-
2829 steps :
2930 - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
30- - name : Install pnpm
31- uses : pnpm/action-setup@903f9c1a6ebcba6cf41d87230be49611ac97822e # v6.0.3
32- - name : Use Node.js ${{ matrix.node-version }}
33- uses : actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
31+ - name : Setup Vite+
32+ uses : voidzero-dev/setup-vp@be55d5df2da88a2387a2e6764871ca9e5387e187 # v1
3433 with :
35- node-version : ${{ matrix.node-version }}
36- cache : ' pnpm '
37- - name : pnpm install
38- run : pnpm install
39- - name : Run tests
40- run : pnpm run vp: test
34+ node-version : ' 24 '
35+ cache : true
36+ - name : Install dependencies
37+ run : vp install
38+ - name : Run vp test
39+ run : vp test run
4140 env :
4241 CI : true
Original file line number Diff line number Diff line change 2323
2424## Setup
2525
26+ [ Vite+] ( https://viteplus.dev/ ) (` vp ` )を利用します。` vp install ` は ` package.json ` の ` packageManager ` を参照して、必要なパッケージマネージャーを選択します。
27+
2628``` bash
27- pnpm install
29+ curl -fsSL https://vite.plus | bash
30+ vp install
31+ vp config
2832```
2933
30- ## Development Server
34+ ` vp config ` は vite-plus の設定を反映します。通常は install 時にも実行されますが、 ` vite.config.ts ` を変更したときや生成設定が足りないときは手動で実行してください。
3135
32- ``` bash
33- pnpm dev
34- ```
36+ ## Commands
3537
36- ## Production
38+ 開発サーバやビルドなどの npm scripts も、Lint / Format / Type Check / Test も ` vp ` 経由で実行します。
3739
38- ``` bash
39- pnpm build
40- ```
40+ | 用途 | コマンド |
41+ | ------------- | ----------------- |
42+ | 開発サーバ | ` vp run dev ` |
43+ | ビルド | ` vp run build ` |
44+ | 静的生成 | ` vp run generate ` |
45+ | プレビュー | ` vp run preview ` |
46+ | Lint | ` vp lint . ` |
47+ | Format | ` vp fmt . ` |
48+ | Type Check | ` vp check ` |
49+ | Test | ` vp test run ` |
50+ | Test(watch) | ` vp test ` |
51+
52+ ## CI
53+
54+ GitHub Actions でも同じ ` vp ` コマンドを実行します。
55+
56+ - ` vp lint . `
57+ - ` vp fmt . --check `
58+ - ` vp check `
59+ - ` vp test run `
4160
4261## Deploy
4362
4463``` bash
45- npx nuxthub deploy
64+ vpx nuxthub deploy
4665```
4766
4867## License
You can’t perform that action at this time.
0 commit comments