skip prepare flag

pull/7933/head
tanhauhau 4 years ago
parent 312e4ceb00
commit ad1cc7c8b5

@ -14,7 +14,9 @@ jobs:
with:
node-version: 16
cache: npm
- run: npm install --ignore-scripts
- run: npm install
env:
SKIP_PREPARE: true
- run: npm run build
env:
PUBLISH: true
@ -64,7 +66,9 @@ jobs:
store/
transition/
types/
- run: npm install --ignore-scripts
- run: npm install
env:
SKIP_PREPARE: true
- run: npm test
env:
CI: true
@ -88,5 +92,7 @@ jobs:
- uses: actions/setup-node@v2
with:
cache: npm
- run: npm install --ignore-scripts
- run: npm install
env:
SKIP_PREPARE: true
- run: npm run test:unit

@ -90,7 +90,7 @@
"test:unit": "mocha --config .mocharc.unit.js --exit",
"quicktest": "mocha --exit",
"build": "rollup -c && npm run tsd",
"prepare": "npm run build",
"prepare": "node scripts/skip_in_ci.js npm run build",
"dev": "rollup -cw",
"posttest": "agadoo internal/index.mjs",
"prepublishOnly": "node check_publish_env.js && npm run lint && npm run build && npm test",

@ -0,0 +1,7 @@
if (process.env.SKIP_PREPARE) {
console.log('Skipped "prepare" script');
} else {
const { execSync } = require("child_process");
const command = process.argv.slice(2).join(" ");
execSync(command, { stdio: "inherit" });
}
Loading…
Cancel
Save