-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathTaskfile.yaml
91 lines (78 loc) · 2.24 KB
/
Taskfile.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
version: "3"
tasks:
up:
desc: 開発サーバーを起動します
deps:
- up:frontend
up:frontend:
desc: 開発サーバーを起動します
cmds:
- docker compose up -w --build
up:frontend:npm:
dir: packages/akane-next
cmds:
- npm run dev
up:frontend:storybook:
desc: Storybook を起動します
aliases:
- storybook
dir: packages/akane-next
cmds:
- npm run storybook
down:
desc: 開発サーバーを停止します
cmds:
- docker compose down --remove-orphans
build:
desc: 開発サーバーのイメージをビルドします
cmds:
- docker compose build
test:
desc: テストを実行します
dir: packages/akane-next
deps:
- test:db:migrate
cmds:
- npm run test
env:
DATABASE_URL: "mysql://root@127.0.0.1:3306/akane_test"
setup:
desc: 開発環境をセットアップします
deps:
- nginx:makecert
codegen:graphql:
desc: GraphQLのコードジェネレータを実行します
cmds:
- sh ./scripts/copy-gql-schema.sh
- npm -w packages/akane-next run codegen:graphql
codegen:graphql:watch:
desc: GraphQLのコードジェネレータを監視モードで実行します
cmds:
- sh ./scripts/copy-gql-schema.sh
- npm -w packages/akane-next run codegen:graphql:watch
# akane-next に対して npm コマンドを実行するタスク
# workspace 指定が面倒なのでその shorthand として定義
# e.g. task nan -- install -D vitest
npm:akane-next:
desc: npm コマンドを実行します
aliases:
- nan
cmds:
- npm -w packages/akane-next {{ .CLI_ARGS }}
nginx:makecert:
desc: nginx の証明書を生成します
cmds:
- sh docker/nginx/setup-certs.sh
prisma:
desc: Prisma の CLI を実行します
dir: packages/akane-next
cmds:
- npx prisma {{ .CLI_ARGS }}
env:
DATABASE_URL: "mysql://root@localhost:3306/akane"
test:db:migrate:
desc: データベースのマイグレーションを実行します
cmds:
- npx prisma migrate dev --schema packages/akane-next/prisma/schema.prisma
env:
DATABASE_URL: "mysql://root@127.0.0.1:3306/akane_test"