-
Notifications
You must be signed in to change notification settings - Fork 73
/
lage.config.js
94 lines (93 loc) · 2.4 KB
/
lage.config.js
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
// @ts-check
const path = require("path");
const fastGlob = require("fast-glob");
/** @type {import("lage").ConfigOptions} */
module.exports = {
pipeline: {
"lage#bundle": ["^^transpile", "types"],
types: {
type: "worker",
options: {
worker: path.join(__dirname, "scripts/worker/types.js"),
},
dependsOn: ["^types"],
outputs: ["lib/**/*.d.ts"],
},
isolatedTypes: {
type: "worker",
options: {
worker: path.join(__dirname, "scripts/worker/types.js"),
},
dependsOn: [],
outputs: ["lib/**/*.d.ts"],
},
transpile: {
type: "worker",
options: {
worker: path.join(__dirname, "scripts/worker/transpile.js"),
},
outputs: ["lib/**/*.js"],
},
test: {
type: "worker",
weight: (target) => {
return fastGlob.sync("tests/**/*.test.ts", { cwd: target.cwd }).length;
},
options: {
worker: path.join(__dirname, "scripts/worker/jest.js"),
},
dependsOn: ["build"],
},
build: {
type: "noop",
dependsOn: ["transpile", "types"],
},
"@lage-run/globby#types": {
type: "npmScript",
},
"@lage-run/globby#transpile": {
type: "npmScript",
},
"@lage-run/globby#isoldatedTypes": {
type: "npmScript",
options: {
script: "types",
},
},
lint: {
type: "worker",
options: {
worker: path.join(__dirname, "scripts/worker/lint.js"),
},
},
depcheck: {
type: "worker",
options: {
worker: path.join(__dirname, "scripts/worker/depcheck.js"),
},
},
"@lage-run/e2e-tests#test": {
type: "npmScript",
dependsOn: ["^^transpile", "lage#bundle"],
},
},
npmClient: "yarn",
cacheOptions: {
// These are relative to the git root, and affect the hash of the cache.
// Changes to any of these files will invalidate the cache.
environmentGlob: [
// Folder globs MUST end with **/* to include all files!
"!node_modules/**/*",
"!**/node_modules/**/*",
".github/workflows/*",
"beachball.config.js",
"lage.config.js",
"package.json",
"packages/tsconfig.lage2.json",
"patches/**/*",
"yarn.lock",
],
// Subset of files in package directories that will be saved into the cache.
outputGlob: ["lib/**/*", "dist/**/*", ".docusaurus/**/*", "build/**/*"],
},
};