-
Notifications
You must be signed in to change notification settings - Fork 9
/
turbo.json
130 lines (127 loc) · 3.88 KB
/
turbo.json
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
/////////////////////////////////////////////////////
/////////////////////////////////////////////////////
//
// NOTE on convention:
// script names starting with "_:" do so because
// they are not intended to be invoked by humans
// turborepo will invoke these scripts, freeing
// up the more human-readable script names for
// running by humans.
//
// This helps reduce the possibility of accidental
// cycles in script dependencies and invocation.
//
// One way to think about this is to ask a question:
//
// Is the script and endpoint command?
// as in, it's not a meta-script or script-running script?
//
// If the script is an endpoint command,
// the _: prefix is not needed.
//
// Otherwise, the _: is needed, because the local /
// package-specific script would be in conflict.
// (We want to avoid having turbo call scripts that call turbo)
//
/////////////////////////////////////////////////////
/////////////////////////////////////////////////////
{
"baseBranch": "origin/main",
"globalDependencies": ["pnpm-lock.yaml"],
"pipeline": {
/////////////////////////////////////////////////
/////////////////////////////////////////////////
//
// Local Dev
//
/////////////////////////////////////////////////
/////////////////////////////////////////////////
"dev": {
"dependsOn": ["^dev"],
"cache": false
},
"start": {
"dependsOn": ["_syncPnpm", "^build"],
"outputs": [],
"cache": false,
"persistent": true
},
/////////////////////////////////////////////////
/////////////////////////////////////////////////
//
// C.I. / C.D.
//
/////////////////////////////////////////////////
/////////////////////////////////////////////////
// development
"build:dev": {
"outputs": ["dist/**"],
"dependsOn": ["_syncPnpm"]
},
"pack": {
"outputs": ["*.tgz"],
"dependsOn": ["build"]
},
// production
"build": {
"outputs": ["dist/**", "dist-types/**"],
"dependsOn": ["_syncPnpm"]
},
"_syncPnpm": {
"dependsOn": ["^build"],
"cache": false
},
"test": {
"outputs": [],
"dependsOn": ["_syncPnpm", "^build"]
},
// Apps will have test:ember and test:browserstack
// They are separate so that they can cache independently
// and provide more variability than just "test"
"test:ember": {
"env": [
"CI_BROWSER",
"EMBER_TRY_CURRENT_SCENARIO",
"EMBROIDER_TEST_SETUP_OPTIONS"
],
"dependsOn": ["^build"]
},
// All scenarios
"test:scenarios": {
"dependsOn": ["^build"]
},
/////////////////////////////////////////////////
/////////////////////////////////////////////////
//
// Quality Checks
//
/////////////////////////////////////////////////
/////////////////////////////////////////////////
"_:lint": {
"outputs": [],
"dependsOn": [
"lint:js",
"lint:hbs",
"lint:prettier",
"lint:types",
"lint:package",
"lint:published-types"
]
},
"lint:js": { "outputs": [] },
"lint:hbs": { "outputs": [] },
"lint:prettier": { "outputs": [] },
"lint:types": { "outputs": [], "dependsOn": ["_syncPnpm"] },
"lint:package": { "outputs": [], "dependsOn": ["build"] },
"lint:published-types": { "outputs": [], "dependsOn": ["pack"] },
"_:lint:fix": {
"cache": false,
"dependsOn": ["lint:js:fix", "lint:prettier:fix", "lint:hbs:fix"]
},
// Prettier can alter files too, so let's prevent race conditions for multiple
// writing to the same files.
"lint:js:fix": { "cache": false },
"lint:hbs:fix": { "cache": false, "dependsOn": ["lint:prettier:fix"] },
"lint:prettier:fix": { "cache": false, "dependsOn": ["lint:js:fix"] }
}
}