|
| 1 | +# for filepath in "./src/angular.ts"; do |
1 | 2 | for filepath in ./src/*; do
|
2 |
| - file=$(basename $filepath) |
| 3 | + for js_version in "ES5" "ES6"; do |
3 | 4 |
|
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) |
9 | 6 |
|
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 |
14 | 12 |
|
| 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 |
15 | 21 | done
|
16 | 22 |
|
17 | 23 | # keep the process running until all backgrounded tasks have finished
|
18 | 24 | wait
|
19 | 25 |
|
20 |
| -echo "Integration bundles built successfully" |
| 26 | +echo -e "\nIntegration bundles built successfully" |
0 commit comments