Skip to content

Commit 2d442db

Browse files
committed
use both ES5 and ES6 as values for js version env var
1 parent 1e62ec6 commit 2d442db

File tree

1 file changed

+16
-11
lines changed

1 file changed

+16
-11
lines changed
Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,25 @@
11
for filepath in ./src/*; do
2-
file=$(basename $filepath)
2+
for js_version in "ES5" "ES6"; do
33

4-
# the index file is only there for the purposes of npm builds - for the CDN we create a separate bundle for each
5-
# integration - so we can skip it here
6-
if [[ $file == "index.ts" ]]; then
7-
continue
8-
fi
4+
file=$(basename $filepath)
95

10-
# run the build for each integration, pushing each build process into the background once it starts (that's what the
11-
# trailing `&` does) so that we can start another one
12-
echo -e "\nBuilding bundles for \`$file\`..."
13-
INTEGRATION_FILE=$file yarn --silent rollup -c rollup.config.js 2>/dev/null && echo -e "\nFinished building bundles for \`$file\`." &
6+
# the index file is only there for the purposes of npm builds - for the CDN we create a separate bundle for each
7+
# integration - so we can skip it here
8+
if [[ $file == "index.ts" ]]; then
9+
continue
10+
fi
1411

12+
# run the build for each integration, pushing each build process into the background once it starts (that's what the
13+
# trailing `&` does) so that we can start another one
14+
echo -e "Building $js_version bundles for \`$file\`..."
15+
INTEGRATION_FILE=$file JS_VERSION=$js_version \
16+
yarn --silent rollup -c rollup.config.js &&
17+
echo -e "Finished building $js_version bundles for \`$file\`." &
18+
19+
done
1520
done
1621

1722
# keep the process running until all backgrounded tasks have finished
1823
wait
1924

20-
echo "Integration bundles built successfully"
25+
echo -e "\nIntegration bundles built successfully"

0 commit comments

Comments
 (0)