Skip to content

Commit 505d13d

Browse files
committed
chore: 🤖 nx cache
1 parent aba831e commit 505d13d

File tree

3 files changed

+27
-8
lines changed

3 files changed

+27
-8
lines changed

lefthook.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ pre-commit:
2121
# group:
2222
# parallel: true
2323
# jobs:
24-
# - name: typecheck
25-
# glob: "*.{ts,tsx}"
26-
# run: pnpm tsc
27-
# - name: test
28-
# glob: "*.{ts,tsx}"
29-
# run: pnpm run test
24+
# - name: typecheck
25+
# glob: "*.{ts,tsx}"
26+
# run: pnpm tsc
27+
# - name: test
28+
# glob: "*.{ts,tsx,js,jsx,mjs,mts,json,css,scss}"
29+
# run: pnpm nx affected -t prod test:ci --files={staged_files}
3030

3131
prepare-commit-msg:
3232
commands:

nx.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,28 @@
11
{
22
"$schema": "./node_modules/nx/schemas/nx-schema.json",
3+
"namedInputs": {
4+
"sharedGlobals": [{ "runtime": "node --version" }],
5+
"default": ["{projectRoot}/**/*", "sharedGlobals", "!{projectRoot}/**/*.md"],
6+
"production": [
7+
"default",
8+
"!{projectRoot}/jest.config.[jt]s",
9+
"!{projectRoot}/**/*.{spec,test,e2e}.[jt]s?(x)"
10+
]
11+
},
312
"targetDefaults": {
413
"prod": {
14+
"inputs": ["production"],
515
"dependsOn": ["^prod"],
616
"cache": true
17+
},
18+
"test:ci": {
19+
"inputs": ["default", "^production"],
20+
"dependsOn": ["^test:ci"],
21+
"cache": true
22+
},
23+
"updateSnapshot": {
24+
"inputs": ["default", "^production"],
25+
"cache": true
726
}
827
}
928
}

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@
2626
"clear-all": "rimraf **/node_modules",
2727
"lint": "biome check --fix packages",
2828
"lint:style": "stylelint ./packages/**/*.{scss}",
29-
"test": "pnpm --if-present -r --aggregate-output --filter=./packages/* --filter=./tests test:ci",
29+
"test": "nx run-many -t test:ci",
3030
"test:binding": "pnpm --filter @tarojs/binding run test",
31-
"updateSnapshot": "pnpm --if-present -r --aggregate-output --filter=./tests --filter=./packages/* updateSnapshot",
31+
"updateSnapshot": "nx run-many -t updateSnapshot",
3232
"version": "run-s version:*",
3333
"version:release": "pnpm --parallel -r --aggregate-output --filter=./{npm/**,crates/native_binding,packages/*} exec npm version ${npm_package_version}",
3434
"version:git": "git add . && git commit -m \"chore(release): publish ${npm_package_version}\"",

0 commit comments

Comments
 (0)