From ce335a03715dfef473fe4ca2f379fe43bae275bc Mon Sep 17 00:00:00 2001 From: Robin Van den Broeck Date: Tue, 7 May 2024 07:14:55 +0200 Subject: [PATCH] Define inputs for nx (#2603) --- .gitignore | 2 ++ nx.json | 27 +++++++++++++++++++++++++-- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 946bdf1629..145fdda4a6 100644 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,5 @@ npm-debug.log* node_modules .vscode + +.nx/ diff --git a/nx.json b/nx.json index 904e9c1bcf..12ed3f9af0 100644 --- a/nx.json +++ b/nx.json @@ -7,16 +7,39 @@ } } }, + "namedInputs": { + "default": [ + "{workspaceRoot}/pnpm-lock.yaml", + "{workspaceRoot}/tsconfig.shared.json", + "{projectRoot}/package.json", + "{projectRoot}/tsconfig.json" + ] + }, "targetDefaults": { "build": { "dependsOn": ["^build"], + "inputs": [ + "default", + "{workspaceRoot}/tsup.config.ts", + "{projectRoot}/index.{js,ts}", + "{projectRoot}/index.d.ts", + "{projectRoot}/lib/**", + "{projectRoot}/rollup.config.cjs" + ], "outputs": ["{projectRoot}/dist"] }, "test": { - "dependsOn": ["^test"] + "inputs": [ + "default", + "{projectRoot}/test.ts", + "{projectRoot}/test/**", + "{projectRoot}/types.ts" + ], + "dependsOn": ["build"] }, "last-checks": { - "dependsOn": ["^last-checks"] + "inputs": ["default", "{projectRoot}/test.ts"], + "dependsOn": ["build", "^last-checks"] } } }