Skip to content

Commit ff47671

Browse files
committed
use both ES5 and ES6 as values for js version env var
1 parent da28efd commit ff47671

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed
Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,26 @@
1+
# for filepath in "./src/angular.ts"; do
12
for filepath in ./src/*; do
2-
file=$(basename $filepath)
3+
for js_version in "ES5" "ES6"; do
34

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
5+
file=$(basename $filepath)
96

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\`." &
7+
# the index file is only there for the purposes of npm builds - for the CDN we create a separate bundle for each
8+
# integration - so we can skip it here
9+
if [[ $file == "index.ts" ]]; then
10+
continue
11+
fi
1412

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

1723
# keep the process running until all backgrounded tasks have finished
1824
wait
1925

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

0 commit comments

Comments
 (0)