Skip to content

Commit 1eb2b33

Browse files
authored
build(nx): Improve Nx setup (#9987)
1 parent ea74266 commit 1eb2b33

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

nx.json

+12-10
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,22 @@
33
"default": {
44
"runner": "nx/tasks-runners/default",
55
"options": {
6-
"cacheableOperations": ["build:bundle", "build:transpile", "build:types", "lint:eslint", "test:unit"],
6+
"cacheableOperations": [
7+
"build:bundle",
8+
"build:transpile",
9+
"build:types",
10+
"lint:eslint",
11+
"test:unit",
12+
"build:tarball"
13+
],
714
"cacheDirectory": ".nxcache"
815
}
916
}
1017
},
1118
"namedInputs": {
1219
"default": ["{projectRoot}/**/*", "sharedGlobals"],
1320
"sharedGlobals": ["{workspaceRoot}/*.js", "{workspaceRoot}/*.json"],
14-
"production": ["default", "!{projectRoot}/test/**/*", "!{projectRoot}/**/*.md"]
21+
"production": ["default", "!{projectRoot}/test/**/*", "!{projectRoot}/**/*.md", "!{projectRoot}/*.tgz"]
1522
},
1623
"targetDefaults": {
1724
"build:bundle": {
@@ -21,8 +28,8 @@
2128
},
2229
"build:tarball": {
2330
"inputs": ["production", "^production"],
24-
"dependsOn": ["build:transpile", "build:types"],
25-
"outputs": []
31+
"dependsOn": ["build:transpile", "^build:transpile", "build:types", "^build:types"],
32+
"outputs": ["{projectRoot}/*.tgz"]
2633
},
2734
"build:transpile": {
2835
"inputs": ["production", "^production"],
@@ -32,12 +39,7 @@
3239
"build:types": {
3340
"inputs": ["production", "^production"],
3441
"dependsOn": ["^build:types"],
35-
"outputs": [
36-
"{projectRoot}/build/types",
37-
"{projectRoot}/build/types-ts3.8",
38-
"{projectRoot}/build/npm/types",
39-
"{projectRoot}/build/npm/types-ts3.8"
40-
]
42+
"outputs": ["{projectRoot}/build/**/*.d.ts"]
4143
},
4244
"lint:eslint": {
4345
"inputs": ["default"],

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"private": true,
33
"scripts": {
4-
"build": "node ./scripts/verify-packages-versions.js && run-s build:transpile build:types build:bundle",
4+
"build": "node ./scripts/verify-packages-versions.js && lerna run build:transpile,build:types,build:bundle",
55
"build:bundle": "lerna run build:bundle",
66
"build:dev": "lerna run build:types,build:transpile",
77
"build:dev:filter": "lerna run build:dev --include-filtered-dependencies --include-filtered-dependents --scope",

0 commit comments

Comments
 (0)