Skip to content

Commit

Permalink
cast BABEL_8_BREAKING to bool
Browse files Browse the repository at this point in the history
  • Loading branch information
JLHwung committed Jan 27, 2022
1 parent df66712 commit cef0f22
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Gulpfile.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ const buildTypingsWatchGlob = [
"./packages/babel-types/scripts/generators/*.js",
];

// env vars from the cli are always strings, so !!ENV_VAR returns true for "false"
function bool(value) {
return value && value !== "false" && value !== "0";
}

/**
* map source code path to the generated artifacts path
* @example
Expand Down Expand Up @@ -581,7 +586,7 @@ function* libBundlesIterator() {
}

let libBundles;
if (process.env.BABEL_8_BREAKING) {
if (bool(process.env.BABEL_8_BREAKING)) {
libBundles = [...libBundlesIterator()];
} else {
libBundles = [
Expand Down

0 comments on commit cef0f22

Please sign in to comment.