Skip to content

Commit

Permalink
fix: bundle names in angular examples
Browse files Browse the repository at this point in the history
Naming is now bundle-es2015.min and bundle-es5.min to closer resemble what the naming scheme the angular CLI uses
  • Loading branch information
gregmagolan committed Oct 16, 2019
1 parent bd2f108 commit b4f01e2
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 26 deletions.
24 changes: 13 additions & 11 deletions examples/angular/src/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -121,38 +121,40 @@ ts_devserver(
)

rollup_bundle(
name = "bundle",
name = "bundle-es2015",
config_file = "rollup.config.js",
entry_point = ":main.prod.ts",
entry_points = {
":main.prod.ts": "index",
},
output_dir = True,
deps = ["//src"],
)

babel(
name = "bundle.es2015",
name = "bundle-es5",
args = [
"$(location :bundle)",
"$(location :bundle-es2015)",
"--no-babelrc",
"--source-maps",
"--presets=@babel/preset-env",
"--out-dir",
"$@",
],
data = [
":bundle",
":bundle-es2015",
"@npm//@babel/preset-env",
],
output_dir = True,
)

terser_minified(
name = "bundle.min",
src = ":bundle",
name = "bundle-es2015.min",
src = ":bundle-es2015",
)

terser_minified(
name = "bundle.min.es2015",
src = ":bundle.es2015",
name = "bundle-es5.min",
src = ":bundle-es5",
)

web_package(
Expand All @@ -165,8 +167,8 @@ web_package(
],
# do not sort
assets = _ASSETS + [
":bundle.min",
":bundle.min.es2015",
":bundle-es2015.min",
":bundle-es5.min",
],
data = [
"//src/assets",
Expand Down
4 changes: 2 additions & 2 deletions examples/angular/src/example/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

<!-- TODO: figure out how diff. loading interacts with
https://www.npmjs.com/package/rollup-plugin-bundle-html -->
<script type="module" src="/bundle.min/bundle.js"></script>
<script nomodule="" src="/bundle.min.es2015/bundle.js"></script>
<script type="module" src="/bundle-es2015.min/index.js"></script>
<script nomodule="" src="/bundle-es5.min/index.js"></script>
</body>
</html>
24 changes: 13 additions & 11 deletions examples/angular_view_engine/src/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -119,38 +119,40 @@ ts_devserver(
)

rollup_bundle(
name = "bundle",
name = "bundle-es2015",
config_file = "rollup.config.js",
entry_point = ":main.prod.ts",
entry_points = {
":main.prod.ts": "index",
},
output_dir = True,
deps = ["//src"],
)

babel(
name = "bundle.es2015",
name = "bundle-es5",
args = [
"$(location :bundle)",
"$(location :bundle-es2015)",
"--no-babelrc",
"--source-maps",
"--presets=@babel/preset-env",
"--out-dir",
"$@",
],
data = [
":bundle",
":bundle-es2015",
"@npm//@babel/preset-env",
],
output_dir = True,
)

terser_minified(
name = "bundle.min",
src = ":bundle",
name = "bundle-es2015.min",
src = ":bundle-es2015",
)

terser_minified(
name = "bundle.min.es2015",
src = ":bundle.es2015",
name = "bundle-es5.min",
src = ":bundle-es5",
)

web_package(
Expand All @@ -163,8 +165,8 @@ web_package(
],
# do not sort
assets = _ASSETS + [
":bundle.min",
":bundle.min.es2015",
":bundle-es2015.min",
":bundle-es5.min",
],
data = [
"//src/assets",
Expand Down
4 changes: 2 additions & 2 deletions examples/angular_view_engine/src/example/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

<!-- TODO: figure out how diff. loading interacts with
https://www.npmjs.com/package/rollup-plugin-bundle-html -->
<script type="module" src="/bundle.min/bundle.js"></script>
<script nomodule="" src="/bundle.min.es2015/bundle.js"></script>
<script type="module" src="/bundle-es2015.min/index.js"></script>
<script nomodule="" src="/bundle-es5.min/index.js"></script>
</body>
</html>

0 comments on commit b4f01e2

Please sign in to comment.