-
Notifications
You must be signed in to change notification settings - Fork 114
Expand file tree
/
Copy pathTaskfile.yml
More file actions
93 lines (79 loc) · 2.56 KB
/
Taskfile.yml
File metadata and controls
93 lines (79 loc) · 2.56 KB
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
92
93
# https://taskfile.dev
# npm scriptでは表現力が不足するため、Taskfile.ymlを使用しています。
version: "3"
tasks:
default:
cmd: task -a
silent: true
start:
desc: 開発用サーバーを起動します
cmds:
- bunx docusaurus start
test:
desc: テストを実行します
cmds:
- bunx jest
clear:
desc: ビルドのクリーンアップを行います
cmds:
- bunx docusaurus clear
ci:
desc: CIを行います
cmds:
- bun install --frozen-lockfile
- node --version
- bun --version
- task: check
- task: test
- task: build
check:
desc: 全体的なチェックを行います
cmds:
- task: check:format
- task: check:markdown
- task: check:japanese
- task: check:type
check:markdown:
desc: Markdownファイルのチェックを行います (markdownlint)
cmds:
- defer: echo '{{if .EXIT_CODE}}一部のエラーは`task check:markdown:fix`で修正できます{{end}}'
silent: true
- bunx markdownlint '**/*.md'
check:markdown:fix:
desc: Markdownファイルの問題を修正します (markdownlint)
cmds:
- bunx markdownlint '**/*.md' --fix
check:japanese:
desc: 日本語の問題をチェックします (textlint)
cmds:
- defer: echo '{{if .EXIT_CODE}}一部のエラーは`task check:japanese:fix`で修正できます{{end}}'
silent: true
- bunx textlint 'docs/**/*.md'
check:japanese:fix:
desc: 日本語の問題を修正します (textlint)
cmds:
- bunx textlint 'docs/**/*.md' --fix
check:format:
desc: コードのフォーマットをチェックします (prettier)
cmds:
- defer: echo '{{if .EXIT_CODE}}フォーマットエラーは`task format`で修正できます{{end}}'
silent: true
- bunx prettier '**/*.{js,jsx,ts,tsx,json,json5,css,scss,graphql,gql,html,vue,yaml,md}' --check
format:
desc: コードのフォーマットを修正します (prettier)
cmds:
- bunx prettier '**/*.{js,jsx,ts,tsx,json,json5,css,scss,graphql,gql,html,vue,yaml,md}' --write
check:type:
desc: 型チェックを行います (tsc)
cmds:
- bunx tsc --noEmit
build:
desc: ビルドを行います
cmds:
- bunx docusaurus build
env:
NODE_OPTIONS: --max-old-space-size=8192 # ヒープ上限にひっかかって、OOMエラーになるのを防ぐため
serve:
desc: ビルドした成果物をサーバーで実行します
cmds:
- bunx docusaurus serve