Skip to content

Commit 5a72c5a

Browse files
committed
Updated Nx to v19
refs https://github.com/nrwl/nx/releases/tag/19.8.0 - this commit updates Nx to v19 - we need to add some extra commands to the dev script to stop and restart the Nx daemon, so it's ready and running before we execute a bunch of Nx commands concurrently - this also updates nx.json to the format needed for the latest version
1 parent 052ef69 commit 5a72c5a

File tree

5 files changed

+203
-196
lines changed

5 files changed

+203
-196
lines changed

.github/scripts/dev.js

+4
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,10 @@ async function handleStripe() {
231231
process.exit(0);
232232
}
233233

234+
process.env.NX_DISABLE_DB = "true";
235+
await exec("yarn nx reset --onlyDaemon");
236+
await exec("yarn nx daemon --start");
237+
234238
console.log(`Running projects: ${commands.map(c => chalk.green(c.name)).join(', ')}`);
235239

236240
const {result} = concurrently(commands, {

.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,10 @@ typings/
4848
# Optional npm cache directory
4949
.npm
5050

51-
# Nx cache
51+
# Nx
5252
.nxcache
53+
.nx/cache
54+
.nx/workspace-data
5355

5456
# Optional eslint cache
5557
.eslintcache

nx.json

+22-36
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,15 @@
11
{
2-
"tasksRunnerOptions": {
3-
"default": {
4-
"runner": "nx/tasks-runners/default",
5-
"options": {
6-
"cacheableOperations": [
7-
"build",
8-
"build:ts",
9-
"lint",
10-
"test",
11-
"test:unit"
12-
],
13-
"useDaemonProcess": false,
14-
"cacheDirectory": ".nxcache"
15-
}
16-
}
17-
},
2+
"$schema": "./node_modules/nx/schemas/nx-schema.json",
183
"namedInputs": {
19-
"default": [
20-
"{projectRoot}/**/*",
21-
"{workspaceRoot}/ghost/tsconfig.json"
22-
]
4+
"default": ["{projectRoot}/**/*", "{workspaceRoot}/ghost/tsconfig.json"]
235
},
246
"targetDefaults": {
257
"build": {
26-
"dependsOn": [
27-
"^build"
28-
],
8+
"dependsOn": ["^build"],
299
"inputs": [
30-
{ "env": "GHOST_CDN_URL" },
10+
{
11+
"env": "GHOST_CDN_URL"
12+
},
3113
"default",
3214
"^default"
3315
],
@@ -36,20 +18,24 @@
3618
"{projectRoot}/es",
3719
"{projectRoot}/types",
3820
"{projectRoot}/umd"
39-
]
21+
],
22+
"cache": true
4023
},
4124
"build:ts": {
42-
"dependsOn": [
43-
"^build:ts"
44-
],
45-
"inputs": [
46-
"default",
47-
"^default"
48-
],
49-
"outputs": [
50-
"{projectRoot}/build"
51-
]
25+
"dependsOn": ["^build:ts"],
26+
"inputs": ["default", "^default"],
27+
"outputs": ["{projectRoot}/build"],
28+
"cache": true
29+
},
30+
"lint": {
31+
"cache": true
32+
},
33+
"test": {
34+
"cache": true
35+
},
36+
"test:unit": {
37+
"cache": true
5238
}
5339
},
54-
"$schema": "./node_modules/nx/schemas/nx-schema.json"
40+
"cacheDirectory": ".nxcache"
5541
}

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@
120120
"husky": "8.0.3",
121121
"inquirer": "8.2.6",
122122
"lint-staged": "15.2.10",
123-
"nx": "16.8.1",
123+
"nx": "19.8.0",
124124
"rimraf": "5.0.10",
125125
"ts-node": "10.9.2",
126126
"typescript": "5.4.5"

0 commit comments

Comments
 (0)