Skip to content

Commit

Permalink
Build standalone on prepublish
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo committed Dec 15, 2018
1 parent 47da5cf commit 7bcd62c
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ build-standalone:
build-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
cd packages/babel-polyfill; \
scripts/build-dist.sh
Expand Down Expand Up @@ -115,7 +121,7 @@ prepublish-build:
rm -rf packages/babel-runtime/helpers
rm -rf packages/babel-runtime-corejs2/helpers
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

prepublish:
Expand Down
11 changes: 11 additions & 0 deletions packages/babel-preset-env-standalone/scripts/prepublish.js
Original file line number Diff line number Diff line change
@@ -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",
}
);
7 changes: 7 additions & 0 deletions packages/babel-standalone/scripts/prepublish.js
Original file line number Diff line number Diff line change
@@ -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",
});

0 comments on commit 7bcd62c

Please sign in to comment.