skip prepare flag

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

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

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