Skip to content

Commit 5b8657d

Browse files
committed
refactor(nx): Setup nx project dependencies
1 parent 6932be3 commit 5b8657d

File tree

5 files changed

+37
-18
lines changed

5 files changed

+37
-18
lines changed

dev/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"scripts": {
99
"dev": "cross-env NODE_OPTIONS=--no-deprecation next dev -p 5000",
1010
"build": "cross-env NODE_OPTIONS=--no-deprecation next build",
11-
"start": "cross-env NODE_OPTIONS=--no-deprecation next start",
11+
"start": "cross-env NODE_OPTIONS=--no-deprecation next start -p 5000",
1212
"payload": "payload",
1313
"generate:types": "payload generate:types",
1414
"generate:schema": "payload-graphql generate:schema",

dev/project.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"$schema": "../node_modules/nx/schemas/project-schema.json",
3+
"projectType": "application",
4+
"targets": {
5+
"dev": {
6+
"outputs": ["{projectRoot}/.next"],
7+
"cache": false,
8+
"dependsOn": ["^build"]
9+
},
10+
"build": {
11+
"outputs": ["{projectRoot}/.next"],
12+
"cache": true,
13+
"dependsOn": ["^build"]
14+
},
15+
"start": {
16+
"dependsOn": ["build"]
17+
}
18+
}
19+
}

nx.json

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,5 @@
11
{
22
"$schema": "./node_modules/nx/schemas/nx-schema.json",
3-
"targetDefaults": {
4-
"dev": {
5-
"outputs": ["{projectRoot}/dev/.next"],
6-
"cache": true
7-
},
8-
"build": {
9-
"outputs": ["{projectRoot}/dist"],
10-
"cache": true
11-
},
12-
"lint": {
13-
"cache": true
14-
},
15-
"lint:fix": {
16-
"cache": false
17-
}
18-
},
193
"defaultBase": "main",
204
"plugins": [
215
{

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@
3939
"next-auth"
4040
],
4141
"scripts": {
42+
"dev": "nx --project payload-authjs-dev run dev",
4243
"build": "tsc",
43-
"dev": "pnpm -C dev run dev",
4444
"lint": "eslint .",
4545
"lint:fix": "eslint . --fix"
4646
},

project.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"$schema": "./node_modules/nx/schemas/project-schema.json",
3+
"projectType": "library",
4+
"targets": {
5+
"build": {
6+
"outputs": ["{projectRoot}/dist"],
7+
"cache": true
8+
},
9+
"lint": {
10+
"cache": true
11+
},
12+
"lint:fix": {
13+
"cache": false
14+
}
15+
}
16+
}

0 commit comments

Comments
 (0)