-
-
Notifications
You must be signed in to change notification settings - Fork 22
/
turbo.json
136 lines (133 loc) · 4.23 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
131
132
133
134
135
136
/////////////////////////////////////////////////////
/////////////////////////////////////////////////////
//
// 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)
//
/////////////////////////////////////////////////////
/////////////////////////////////////////////////////
{
"globalDependencies": [".prettierrc.cjs", ".prettierignore", "pnpm-lock.yaml", ".npmrc"],
"tasks": {
/////////////////////////////////////////////////
/////////////////////////////////////////////////
//
// Local Dev
//
/////////////////////////////////////////////////
/////////////////////////////////////////////////
"dev": {
"dependsOn": ["^build"],
"cache": false,
"persistent": true
},
"start": {
"dependsOn": ["^build"],
"cache": false,
"persistent": true
},
/////////////////////////////////////////////////
/////////////////////////////////////////////////
//
// C.I. / C.D.
//
/////////////////////////////////////////////////
/////////////////////////////////////////////////
"pack": {
"outputs": ["*.tgz"],
"dependsOn": ["build"]
},
"build": {
"outputs": ["dist/**", "declarations/**"],
"dependsOn": ["^build"]
},
"test:node": {
"outputs": [],
"dependsOn": []
},
// 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"]
},
"test:browserstack": {
"dependsOn": ["^build"],
// see: https://github.com/kategengler/ember-cli-browserstack/blob/b199b19d0fe279fb0dcec13e76985c4492c591d8/lib/utils/build-name-from-env.js#L51
"passThroughEnv": [
"BROWSERSTACK_USERNAME",
"BROWSERSTACK_ACCESS_KEY",
"BROWSERSTACK_LOCAL_IDENTIFIER",
"BROWSERSTACK_BUILD_NAME",
"BROWSERSTACK_BUILD_NAME_PREFIX",
"GITHUB_RUN_ID",
"GITHUB_WORKFLOW",
"GITHUB_REF",
"GITHUB_HEAD_REF",
"GITHUB_RUN_NUMBER",
"GITHUB_JOB",
"CI"
]
},
// 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": ["^build"] },
"lint:package": { "outputs": [], "dependsOn": ["build"] },
"lint:published-types": { "outputs": [], "dependsOn": ["pack"] },
"_:lint:fix": {
"dependsOn": ["lint:js:fix", "lint:prettier:fix", "lint:hbs:fix"]
},
"lint:js:fix": { "outputs": [] },
"lint:hbs:fix": { "outputs": [] },
// Prettier can alter files too, so let's prevent race conditions for multiple
// writing to the same files.
"lint:prettier:fix": { "outputs": [], "dependsOn": ["lint:js:fix", "lint:hbs:fix"] }
}
}