Repository navigation
Expand file tree
/
Copy pathlage.config.mjs
More file actions
97 lines (92 loc) · 3.31 KB
/
Copy pathlage.config.mjs
File metadata and controls
97 lines (92 loc) · 3.31 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
94
95
96
97
import path from 'node:path';
/** @type {import('lage').ConfigOptions} */
const config = {
npmClient: 'yarn',
pipeline: {
// ── Per-package tasks ──────────────────────────────────────────────────
bundle: {
inputs: ['**/*', '!node_modules/**/*', '!dist/**/*', '!lib/**/*', '!lib-commonjs/**/*'],
outputs: ['dist/**/*'],
},
clean: {
cache: false,
},
'check:spec-contracts': {
cache: false,
},
lint: {
inputs: ['*', 'src/**/*'],
outputs: [],
},
test: {
// The unified build is a single root target, not a per-package `build`.
// A bare 'build' would resolve to <thisPackage>#build,
// which doesn't exist, so lage silently drops the edge. Point at the
// specific root target with the packageName#task syntax so every
// package's tests wait for the whole-repo build to finish.
dependsOn: ['@fluentui-react-native/root#root-build', 'check:spec-contracts'],
inputs: [],
outputs: [],
},
// ── Root-only tasks (scripts exist only in the root package.json) ──────
// These run once for the whole repo. Sub-packages do not have these scripts,
// so lage naturally scopes them to the root workspace.
build: {
// tsc project level build has its own caching
cache: false,
},
'check-agent-instructions': {
cache: false,
},
'check-publishing': {
cache: false,
},
'format:check': {
cache: false,
},
'lint-lockfile': {
cache: false,
},
'lint-repo': {
cache: false,
},
prebuild: {
/**
* Prebuild is a pre-build step that can either modify the source code or generate additional files in the project.
*/
dependsOn: ['^prebuild'],
cache: false,
},
'root-prebuild': {
cache: false,
},
'root-build': {
dependsOn: ['@fluentui-react-native/root#root-prebuild'],
cache: false,
},
// ── Pipeline aliases ───────────────────────────────────────────────────
'repo-checks': ['lint-repo', 'check-publishing', 'check-agent-instructions'],
buildci: ['lint-repo', 'check-publishing', 'check-agent-instructions', '@fluentui-react-native/root#root-build', 'test', 'lint'],
// ── Worker tasks ───────────────────────────────────────────────────────
'test-links': {
// Runs markdown-link-check once per package directory; lage parallelizes
// across packages. The worker stops at nested package boundaries so the
// root target does not recurse into workspace directories.
type: 'worker',
options: {
worker: 'scripts/src/worker/test-links.mts',
},
cache: false,
},
pack: {
dependsOn: ['@fluentui-react-native/root#build', '^pack'],
type: 'worker',
options: {
worker: 'scripts/src/worker/pack.mts',
outputDir: path.join(process.env.BUILD_STAGINGDIRECTORY || import.meta.dirname, '_packed'),
},
cache: false,
},
},
};
export default config;