perf: check in neural patterns to avoid rebuild on every publish
- Add embeddedPatterns.ts to version control (544KB file) - Add check-patterns.js script to detect when rebuild is needed - Modify build scripts to only rebuild patterns when changed - This avoids memory-intensive pattern embedding on every npm publish - Patterns rarely change, so this significantly speeds up releases
This commit is contained in:
parent
394acc3516
commit
e30d207cb6
3 changed files with 36 additions and 2 deletions
|
|
@ -58,8 +58,10 @@
|
|||
"node": ">=18.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "npm run build:patterns && tsc",
|
||||
"build": "npm run build:patterns:if-needed && tsc",
|
||||
"build:patterns": "tsx scripts/buildEmbeddedPatterns.ts",
|
||||
"build:patterns:if-needed": "node scripts/check-patterns.js || npm run build:patterns",
|
||||
"build:patterns:force": "npm run build:patterns",
|
||||
"prepare": "npm run build",
|
||||
"test": "npm run test:unit",
|
||||
"test:watch": "vitest --config tests/configs/vitest.unit.config.ts",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue