mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-16 16:30:15 +01:00
feat(prepare.js): add script to install husky only if NODE_ENV is not 'CI' (#512)
refactor(package.json): change prepare script to run prepare.js script instead of husky install directly
This commit is contained in:
parent
2003480fed
commit
9d3e749104
2 changed files with 13 additions and 1 deletions
12
config/prepare.js
Normal file
12
config/prepare.js
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
const { exec } = require('child_process');
|
||||||
|
|
||||||
|
if (process.env.NODE_ENV !== 'CI') {
|
||||||
|
exec('npx husky install', (error, stdout, stderr) => {
|
||||||
|
if (error) {
|
||||||
|
console.error(`exec error: ${error}`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
console.log(`stdout: ${stdout}`);
|
||||||
|
console.error(`stderr: ${stderr}`);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
"test:api": "cd api && npm run test",
|
"test:api": "cd api && npm run test",
|
||||||
"e2e:update": "playwright test --config=e2e/playwright.config.js --update-snapshots",
|
"e2e:update": "playwright test --config=e2e/playwright.config.js --update-snapshots",
|
||||||
"e2e:report": "npx playwright show-report e2e/playwright-report",
|
"e2e:report": "npx playwright show-report e2e/playwright-report",
|
||||||
"prepare": "test \"$NODE_ENV\" != \"CI\" && husky install",
|
"prepare": "node config/prepare.js",
|
||||||
"format": "prettier-eslint --write \"{,!(node_modules)/**/}*.{js,jsx,ts,tsx}\""
|
"format": "prettier-eslint --write \"{,!(node_modules)/**/}*.{js,jsx,ts,tsx}\""
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue