Skip to content

Commit cb2d355

Browse files
chore: Add NX for build tasks
1 parent 901b41c commit cb2d355

File tree

5 files changed

+1256
-9
lines changed

5 files changed

+1256
-9
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ dist/
2727
.AppleDouble
2828
.LSOverride
2929

30+
# NX
31+
.nx/
32+
3033
# Test coverage
3134
coverage/
3235

nx.json

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
"$schema": "./node_modules/nx/schemas/nx-schema.json",
3+
"defaultBase": "main",
4+
"targetDefaults": {
5+
"build:native": {
6+
"cache": true,
7+
"inputs": [
8+
"src/**/*",
9+
"Cargo.toml",
10+
"Cargo.lock"
11+
],
12+
"outputs": ["target/**/*"]
13+
},
14+
"build:ts": {
15+
"cache": true,
16+
"inputs": [
17+
"src/**/*.ts",
18+
"tsconfig.json",
19+
"package.json"
20+
],
21+
"outputs": ["dist/**/*"]
22+
},
23+
"test": {
24+
"cache": true,
25+
"inputs": [
26+
"__tests__/**/*",
27+
"src/**/*",
28+
"vitest.config.ts",
29+
"{workspaceRoot}/package.json"
30+
]
31+
},
32+
"format": {
33+
"cache": true,
34+
"inputs": [
35+
"**/*.{ts,tsx,js,jsx,json,md}",
36+
"biome.json"
37+
]
38+
},
39+
"lint": {
40+
"cache": true,
41+
"inputs": [
42+
"**/*.{ts,tsx,js,jsx}",
43+
"biome.json"
44+
]
45+
}
46+
},
47+
"namedInputs": {
48+
"default": ["{projectRoot}/**/*"],
49+
"production": ["!{projectRoot}/**/*.test.ts"]
50+
}
51+
}

0 commit comments

Comments
 (0)