Skip to content

Commit

Permalink
refactor(material): remove re-exports from primary entry-point
Browse files Browse the repository at this point in the history
Removes the re-exports to all secondary entry-points from the Angular
Material primary entry-point.

BREAKING CHANGE: Components can no longer be imported through "@angular/material". Use the individual secondary entry-points.
  • Loading branch information
devversion authored and jelbourn committed Sep 18, 2019
1 parent f673647 commit 0c1d369
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 57 deletions.
17 changes: 4 additions & 13 deletions src/material/BUILD.bazel
Expand Up @@ -7,21 +7,12 @@ load(
"MATERIAL_TARGETS",
"ROLLUP_GLOBALS",
)
load("//tools:defaults.bzl", "ng_module", "ng_package")
load("//tools:defaults.bzl", "ng_package", "ts_library")
load("//tools:sass_bundle.bzl", "sass_bundle")

# Root "@angular/material" entry-point.
ng_module(
ts_library(
name = "material",
srcs = glob(
["*.ts"],
exclude = ["**/*.spec.ts"],
),
module_name = "@angular/material",
deps = ["//src/material/%s" % p for p in MATERIAL_PACKAGES] + [
"@npm//@angular/forms",
"@npm//@angular/animations",
],
srcs = ["index.ts"],
)

sass_bundle(
Expand Down Expand Up @@ -51,7 +42,7 @@ ng_package(
"//src/material/prebuilt-themes:pink-bluegrey",
"//src/material/prebuilt-themes:purple-green",
],
entry_point = ":public-api.ts",
entry_point = ":index.ts",
entry_point_name = "material",
globals = ROLLUP_GLOBALS,
packages = ["//src/material/schematics:npm_package"],
Expand Down
4 changes: 3 additions & 1 deletion src/material/index.ts
Expand Up @@ -6,4 +6,6 @@
* found in the LICENSE file at https://angular.io/license
*/

export * from './public-api';
// primary entry-point which is empty as of version 9. All components should
// be imported through their individual entry-points. This file is needed to
// satisfy the "ng_package" bazel rule which also requires a primary entry-point.
43 changes: 0 additions & 43 deletions src/material/public-api.ts

This file was deleted.

0 comments on commit 0c1d369

Please sign in to comment.