Build standalone on prepublish

This commit is contained in:
Nicolò Ribaudo 2018-12-15 09:07:39 +01:00
parent 47da5cf75a
commit 7bcd62cfee
3 changed files with 25 additions and 1 deletions

View File

@ -28,6 +28,12 @@ build-standalone:
build-preset-env-standalone: build-preset-env-standalone:
./node_modules/.bin/gulp build-babel-preset-env-standalone ./node_modules/.bin/gulp build-babel-preset-env-standalone
prepublish-build-standalone:
BABEL_ENV=production IS_PUBLISH=true ./node_modules/.bin/gulp build-babel-standalone
prepublish-build-preset-env-standalone:
BABEL_ENV=production IS_PUBLISH=true ./node_modules/.bin/gulp build-babel-preset-env-standalone
build-dist: build build-dist: build
cd packages/babel-polyfill; \ cd packages/babel-polyfill; \
scripts/build-dist.sh scripts/build-dist.sh
@ -115,7 +121,7 @@ prepublish-build:
rm -rf packages/babel-runtime/helpers rm -rf packages/babel-runtime/helpers
rm -rf packages/babel-runtime-corejs2/helpers rm -rf packages/babel-runtime-corejs2/helpers
rm -rf packages/babel-runtime-corejs2/core-js rm -rf packages/babel-runtime-corejs2/core-js
BABEL_ENV=production IS_PUBLISH=true make build-dist BABEL_ENV=production make build-dist
make clone-license make clone-license
prepublish: prepublish:

View File

@ -0,0 +1,11 @@
// This file is executed by lerna before publishing,
// @babel/preset-env-standalone so that it has the
// new version and not the old one.
require("child_process").execSync(
"make prepublish-build-preset-env-standalone",
{
cwd: require("path").resolve(__dirname, "../../.."),
stdio: "inherit",
}
);

View File

@ -0,0 +1,7 @@
// This file is executed by lerna before publishing @babel/standalone,
// so that it has the new version and not the old one.
require("child_process").execSync("make prepublish-build-standalone", {
cwd: require("path").resolve(__dirname, "../../.."),
stdio: "inherit",
});