CI: do not build dist files in node 8 (dependency syntax issues).
This commit is contained in:
parent
5b5904ea99
commit
ae619bcfc7
15
admin/cmds/npm-skip-node8.js
Normal file
15
admin/cmds/npm-skip-node8.js
Normal file
@ -0,0 +1,15 @@
|
||||
"use strict";
|
||||
|
||||
const { major } = require("semver");
|
||||
|
||||
// This should be used like `node npm-skip-node8 || COMMAND`.
|
||||
// - If node 8, this script returns true, skipping COMMAND
|
||||
// - Otherwise, return false, running COMMAND
|
||||
|
||||
if (major(process.version) > 8) {
|
||||
// Node >8; return "false" (wrt to shell scripting)
|
||||
process.exit(1);
|
||||
} else {
|
||||
// Node 8; return "true" (wrt to shell scripting)
|
||||
process.exit(0);
|
||||
}
|
@ -17,7 +17,8 @@
|
||||
"_dist-ancillary": "node ./admin/cmds/set-option esm && rollup -c rollup-ancillary.config.js",
|
||||
"_dist-umd": "node ./admin/cmds/set-option cjs browser-lang-all && rollup -c && mv ./packages/ethers/dist/ethers.umd.min.js ./packages/ethers/dist/ethers-all.umd.min.js && node ./admin/cmds/set-option cjs && rollup -c",
|
||||
"_dist-esm": "node ./admin/cmds/set-option esm browser-lang-all && rollup -c --configModule && mv ./packages/ethers/dist/ethers.esm.min.js ./packages/ethers/dist/ethers-all.esm.min.js && node ./admin/cmds/set-option esm && rollup -c --configModule",
|
||||
"_dist": "npm run _dist-esm && npm run _dist-ancillary && npm run _dist-umd",
|
||||
"_dist-all": "npm run _dist-esm && npm run _dist-ancillary && npm run _dist-umd",
|
||||
"_dist": "node admin/cmds/npm-skip-node8.js || npm run _dist-all",
|
||||
"clean": "node ./admin/cmds/reset-build.js && tsc --build --clean ./tsconfig.project.json",
|
||||
"_dist-test-esm": "rollup -c rollup-tests.config.js --configModule",
|
||||
"_dist-test-umd": "rollup -c rollup-tests.config.js",
|
||||
|
Loading…
Reference in New Issue
Block a user