Optional postinstall script should be cross-platform

There is no cross-platform way to check if the file/directory exists that doesn't depend on adding another NodeJS dependency.
This "skip if failed" approach is more noisy, but it should work everywhere.
This commit is contained in:
Yury Bondarenko
2024-04-24 10:43:09 +02:00
parent 80be4fc8b0
commit 728b561bf4

View File

@@ -46,7 +46,7 @@
"env:yaml": "ts-node --project ./tsconfig.ts-node.json scripts/env-to-yaml.ts",
"base-href": "ts-node --project ./tsconfig.ts-node.json scripts/base-href.ts",
"check-circ-deps": "npx madge --exclude '(bitstream|bundle|collection|config-submission-form|eperson|item|version)\\.model\\.ts$' --circular --extensions ts ./",
"postinstall": "if [ -f lint/tsconfig.json ]; then yarn build:lint ; fi"
"postinstall": "yarn build:lint || echo 'Skipped DSpace ESLint plugins.'"
},
"browser": {
"fs": false,