Skip to content

Commit 1d23030

Browse files
committed
build: fix missing metadata for example modules
Fixes the missing metadata for example modules. This happens because we built the individual example modules without a flat module bundle. Not building with a flat module bundle means that metadata will not be generated in the `ng_module` bazel rule.
1 parent faeb874 commit 1d23030

File tree

99 files changed

+466
-35
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+466
-35
lines changed

packages.bzl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,18 @@ ROLLUP_GLOBALS.update({
170170
for p in MATERIAL_EXPERIMENTAL_PACKAGES
171171
})
172172

173+
# Rollup globals the examples package. Since individual examples are
174+
# grouped by package and component, the primary entry-point imports
175+
# from entry-points which should be treated as external imports.
176+
ROLLUP_GLOBALS.update({
177+
"@angular/material-examples/cdk/%s" % p: "ng.materialExamples.cdk.%s" % p
178+
for p in CDK_PACKAGES + CDK_EXPERIMENTAL_PACKAGES
179+
})
180+
ROLLUP_GLOBALS.update({
181+
"@angular/material-examples/material/%s" % p: "ng.materialExamples.material.%s" % p
182+
for p in MATERIAL_PACKAGES + MATERIAL_EXPERIMENTAL_PACKAGES
183+
})
184+
173185
# UMD bundles for Angular packages and subpackages we depend on for development and testing.
174186
ANGULAR_LIBRARY_UMDS = [
175187
"@npm//:node_modules/@angular/animations/bundles/animations-browser.umd.js",

src/material-examples/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ ng_package(
107107
entry_point = ":public-api.ts",
108108
globals = ROLLUP_GLOBALS,
109109
tags = ["docs-package"],
110-
deps = [":examples"],
110+
deps = [":examples"] + EXAMPLE_PACKAGES,
111111
)
112112

113113
genrule(

src/material-examples/cdk/a11y/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ ng_module(
99
"**/*.html",
1010
"**/*.css",
1111
]),
12+
module_name = "@angular/material-examples/cdk/a11y",
1213
deps = [
1314
"//src/cdk/a11y",
1415
"//src/material/select",

src/material-examples/cdk/a11y/module.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ import {
99
} from './focus-monitor-focus-via/focus-monitor-focus-via-example';
1010
import {FocusMonitorOverviewExample} from './focus-monitor-overview/focus-monitor-overview-example';
1111

12+
export {FocusMonitorDirectivesExample, FocusMonitorFocusViaExample, FocusMonitorOverviewExample};
13+
1214
const EXAMPLES = [
1315
FocusMonitorDirectivesExample,
1416
FocusMonitorFocusViaExample,
@@ -25,3 +27,4 @@ const EXAMPLES = [
2527
})
2628
export class CdkA11yExamplesModule {
2729
}
30+

src/material-examples/cdk/drag-drop/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ ng_module(
99
"**/*.html",
1010
"**/*.css",
1111
]),
12+
module_name = "@angular/material-examples/cdk/drag-drop",
1213
deps = [
1314
"//src/cdk/drag-drop",
1415
"//src/cdk/overlay",

src/material-examples/cdk/drag-drop/module.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,25 @@ import {
3939
} from './cdk-drag-drop-root-element/cdk-drag-drop-root-element-example';
4040
import {CdkDragDropSortingExample} from './cdk-drag-drop-sorting/cdk-drag-drop-sorting-example';
4141

42+
export {
43+
CdkDragDropAxisLockExample,
44+
CdkDragDropBoundaryExample,
45+
CdkDragDropConnectedSortingExample,
46+
CdkDragDropConnectedSortingGroupExample,
47+
CdkDragDropCustomPlaceholderExample,
48+
CdkDragDropCustomPreviewExample,
49+
CdkDragDropDelayExample,
50+
CdkDragDropDisabledExample,
51+
CdkDragDropDisabledSortingExample,
52+
CdkDragDropEnterPredicateExample,
53+
CdkDragDropFreeDragPositionExample,
54+
CdkDragDropHandleExample,
55+
CdkDragDropHorizontalSortingExample,
56+
CdkDragDropOverviewExample,
57+
CdkDragDropRootElementExample,
58+
CdkDragDropSortingExample,
59+
};
60+
4261
const EXAMPLES = [
4362
CdkDragDropAxisLockExample,
4463
CdkDragDropBoundaryExample,

src/material-examples/cdk/platform/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ ng_module(
99
"**/*.html",
1010
"**/*.css",
1111
]),
12+
module_name = "@angular/material-examples/cdk/platform",
1213
deps = [
1314
"//src/cdk/platform",
1415
],

src/material-examples/cdk/platform/module.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import {PlatformModule} from '@angular/cdk/platform';
22
import {NgModule} from '@angular/core';
33
import {CdkPlatformOverviewExample} from './cdk-platform-overview/cdk-platform-overview-example';
44

5+
export {CdkPlatformOverviewExample};
6+
57
const EXAMPLES = [CdkPlatformOverviewExample];
68

79
@NgModule({

src/material-examples/cdk/popover-edit/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ ng_module(
99
"**/*.html",
1010
"**/*.css",
1111
]),
12+
module_name = "@angular/material-examples/cdk/popover-edit",
1213
deps = [
1314
"//src/cdk-experimental/popover-edit",
1415
"//src/cdk/collections",

src/material-examples/cdk/popover-edit/module.ts

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,19 @@ import {CdkTableModule} from '@angular/cdk/table';
33
import {CommonModule} from '@angular/common';
44
import {NgModule} from '@angular/core';
55
import {FormsModule} from '@angular/forms';
6-
import {
7-
CdkPopoverEditCdkTableFlexExample
8-
} from './cdk-popover-edit-cdk-table-flex/cdk-popover-edit-cdk-table-flex-example';
9-
import {
10-
CdkPopoverEditCdkTableExample
11-
} from './cdk-popover-edit-cdk-table/cdk-popover-edit-cdk-table-example';
12-
import {
13-
CdkPopoverEditCellSpanVanillaTableExample
14-
} from
15-
'./cdk-popover-edit-cell-span-vanilla-table/cdk-popover-edit-cell-span-vanilla-table-example';
16-
import {
17-
CdkPopoverEditTabOutVanillaTableExample
18-
} from './cdk-popover-edit-tab-out-vanilla-table/cdk-popover-edit-tab-out-vanilla-table-example';
19-
import {
6+
import {CdkPopoverEditCdkTableFlexExample} from './cdk-popover-edit-cdk-table-flex/cdk-popover-edit-cdk-table-flex-example';
7+
import {CdkPopoverEditCdkTableExample} from './cdk-popover-edit-cdk-table/cdk-popover-edit-cdk-table-example';
8+
import {CdkPopoverEditCellSpanVanillaTableExample} from './cdk-popover-edit-cell-span-vanilla-table/cdk-popover-edit-cell-span-vanilla-table-example';
9+
import {CdkPopoverEditTabOutVanillaTableExample} from './cdk-popover-edit-tab-out-vanilla-table/cdk-popover-edit-tab-out-vanilla-table-example';
10+
import {CdkPopoverEditVanillaTableExample} from './cdk-popover-edit-vanilla-table/cdk-popover-edit-vanilla-table-example';
11+
12+
export {
13+
CdkPopoverEditCdkTableFlexExample,
14+
CdkPopoverEditCdkTableExample,
15+
CdkPopoverEditCellSpanVanillaTableExample,
16+
CdkPopoverEditTabOutVanillaTableExample,
2017
CdkPopoverEditVanillaTableExample
21-
} from './cdk-popover-edit-vanilla-table/cdk-popover-edit-vanilla-table-example';
18+
};
2219

2320
const EXAMPLES = [
2421
CdkPopoverEditCdkTableExample,

src/material-examples/cdk/portal/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ ng_module(
99
"**/*.html",
1010
"**/*.css",
1111
]),
12+
module_name = "@angular/material-examples/cdk/portal",
1213
deps = [
1314
"//src/cdk/portal",
1415
],

src/material-examples/cdk/portal/module.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import {
55
ComponentPortalExample
66
} from './cdk-portal-overview/cdk-portal-overview-example';
77

8+
export {CdkPortalOverviewExample, ComponentPortalExample};
9+
810
const EXAMPLES = [
911
CdkPortalOverviewExample,
1012
ComponentPortalExample,

src/material-examples/cdk/scrolling/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ ng_module(
99
"**/*.html",
1010
"**/*.css",
1111
]),
12+
module_name = "@angular/material-examples/cdk/scrolling",
1213
deps = [
1314
"//src/cdk/scrolling",
1415
],

src/material-examples/cdk/scrolling/module.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,17 @@ import {
2323
CdkVirtualScrollTemplateCacheExample
2424
} from './cdk-virtual-scroll-template-cache/cdk-virtual-scroll-template-cache-example';
2525

26+
export {
27+
CdkVirtualScrollContextExample,
28+
CdkVirtualScrollCustomStrategyExample,
29+
CdkVirtualScrollDataSourceExample,
30+
CdkVirtualScrollDlExample,
31+
CdkVirtualScrollFixedBufferExample,
32+
CdkVirtualScrollHorizontalExample,
33+
CdkVirtualScrollOverviewExample,
34+
CdkVirtualScrollTemplateCacheExample,
35+
};
36+
2637
const EXAMPLES = [
2738
CdkVirtualScrollContextExample,
2839
CdkVirtualScrollCustomStrategyExample,

src/material-examples/cdk/stepper/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ ng_module(
99
"**/*.html",
1010
"**/*.css",
1111
]),
12+
module_name = "@angular/material-examples/cdk/stepper",
1213
deps = [
1314
"//src/cdk/stepper",
1415
],

src/material-examples/cdk/stepper/module.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ import {
66
CustomStepper
77
} from './cdk-custom-stepper-without-form/cdk-custom-stepper-without-form-example';
88

9+
export {
10+
CdkCustomStepperWithoutFormExample,
11+
CustomStepper,
12+
};
13+
914
const EXAMPLES = [
1015
CdkCustomStepperWithoutFormExample,
1116
CustomStepper,

src/material-examples/cdk/table/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ ng_module(
99
"**/*.html",
1010
"**/*.css",
1111
]),
12+
module_name = "@angular/material-examples/cdk/table",
1213
deps = [
1314
"//src/cdk/table",
1415
],

src/material-examples/cdk/table/module.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ import {NgModule} from '@angular/core';
33
import {CdkTableBasicFlexExample} from './cdk-table-basic-flex/cdk-table-basic-flex-example';
44
import {CdkTableBasicExample} from './cdk-table-basic/cdk-table-basic-example';
55

6+
export {
7+
CdkTableBasicExample,
8+
CdkTableBasicFlexExample,
9+
};
10+
611
const EXAMPLES = [
712
CdkTableBasicExample,
813
CdkTableBasicFlexExample,

src/material-examples/cdk/text-field/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ ng_module(
99
"**/*.html",
1010
"**/*.css",
1111
]),
12+
module_name = "@angular/material-examples/cdk/text-field",
1213
deps = [
1314
"//src/cdk/text-field",
1415
"//src/material/input",

src/material-examples/cdk/text-field/module.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ import {
1313
TextFieldAutosizeTextareaExample
1414
} from './text-field-autosize-textarea/text-field-autosize-textarea-example';
1515

16+
export {
17+
TextFieldAutofillDirectiveExample,
18+
TextFieldAutofillMonitorExample,
19+
TextFieldAutosizeTextareaExample,
20+
};
21+
1622
const EXAMPLES = [
1723
TextFieldAutofillDirectiveExample,
1824
TextFieldAutofillMonitorExample,

src/material-examples/cdk/tree/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ ng_module(
99
"**/*.html",
1010
"**/*.css",
1111
]),
12+
module_name = "@angular/material-examples/cdk/tree",
1213
deps = [
1314
"//src/cdk/tree",
1415
"//src/material/icon",

src/material-examples/cdk/tree/module.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ import {MatIconModule} from '@angular/material/icon';
44
import {CdkTreeFlatExample} from './cdk-tree-flat/cdk-tree-flat-example';
55
import {CdkTreeNestedExample} from './cdk-tree-nested/cdk-tree-nested-example';
66

7+
export {
8+
CdkTreeFlatExample,
9+
CdkTreeNestedExample,
10+
};
11+
712
const EXAMPLES = [
813
CdkTreeFlatExample,
914
CdkTreeNestedExample,

src/material-examples/example-module.ts

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

src/material-examples/material/autocomplete/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ ng_module(
99
"**/*.html",
1010
"**/*.css",
1111
]),
12+
module_name = "@angular/material-examples/material/autocomplete",
1213
deps = [
1314
"//src/material/autocomplete",
1415
"//src/material/form-field",

src/material-examples/material/autocomplete/module.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,16 @@ import {
1717
} from './autocomplete-plain-input/autocomplete-plain-input-example';
1818
import {AutocompleteSimpleExample} from './autocomplete-simple/autocomplete-simple-example';
1919

20+
export {
21+
AutocompleteAutoActiveFirstOptionExample,
22+
AutocompleteDisplayExample,
23+
AutocompleteFilterExample,
24+
AutocompleteOptgroupExample,
25+
AutocompleteOverviewExample,
26+
AutocompletePlainInputExample,
27+
AutocompleteSimpleExample,
28+
};
29+
2030
const EXAMPLES = [
2131
AutocompleteAutoActiveFirstOptionExample,
2232
AutocompleteDisplayExample,

src/material-examples/material/badge/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ ng_module(
99
"**/*.html",
1010
"**/*.css",
1111
]),
12+
module_name = "@angular/material-examples/material/badge",
1213
deps = [
1314
"//src/material/badge",
1415
"//src/material/icon",

src/material-examples/material/badge/module.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import {MatBadgeModule} from '@angular/material/badge';
33
import {MatIconModule} from '@angular/material/icon';
44
import {BadgeOverviewExample} from './badge-overview/badge-overview-example';
55

6+
export {BadgeOverviewExample};
7+
68
const EXAMPLES = [
79
BadgeOverviewExample,
810
];

src/material-examples/material/bottom-sheet/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ ng_module(
99
"**/*.html",
1010
"**/*.css",
1111
]),
12+
module_name = "@angular/material-examples/material/bottom-sheet",
1213
deps = [
1314
"//src/material/bottom-sheet",
1415
"//src/material/list",

src/material-examples/material/bottom-sheet/module.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ import {
66
BottomSheetOverviewExampleSheet
77
} from './bottom-sheet-overview/bottom-sheet-overview-example';
88

9+
export {
10+
BottomSheetOverviewExample,
11+
BottomSheetOverviewExampleSheet,
12+
};
13+
914
const EXAMPLES = [
1015
BottomSheetOverviewExample,
1116
BottomSheetOverviewExampleSheet,

src/material-examples/material/button-toggle/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ ng_module(
99
"**/*.html",
1010
"**/*.css",
1111
]),
12+
module_name = "@angular/material-examples/material/button-toggle",
1213
deps = [
1314
"//src/material/button-toggle",
1415
"//src/material/icon",

src/material-examples/material/button-toggle/module.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ import {
99
} from './button-toggle-exclusive/button-toggle-exclusive-example';
1010
import {ButtonToggleOverviewExample} from './button-toggle-overview/button-toggle-overview-example';
1111

12+
export {
13+
ButtonToggleAppearanceExample,
14+
ButtonToggleExclusiveExample,
15+
ButtonToggleOverviewExample,
16+
};
17+
1218
const EXAMPLES = [
1319
ButtonToggleAppearanceExample,
1420
ButtonToggleExclusiveExample,

src/material-examples/material/button/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ ng_module(
99
"**/*.html",
1010
"**/*.css",
1111
]),
12+
module_name = "@angular/material-examples/material/button",
1213
deps = [
1314
"//src/material/button",
1415
"//src/material/icon",

src/material-examples/material/button/module.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ import {MatIconModule} from '@angular/material/icon';
44
import {ButtonOverviewExample} from './button-overview/button-overview-example';
55
import {ButtonTypesExample} from './button-types/button-types-example';
66

7+
export {
8+
ButtonOverviewExample,
9+
ButtonTypesExample,
10+
};
11+
712
const EXAMPLES = [
813
ButtonOverviewExample,
914
ButtonTypesExample,

src/material-examples/material/card/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ ng_module(
99
"**/*.html",
1010
"**/*.css",
1111
]),
12+
module_name = "@angular/material-examples/material/card",
1213
deps = [
1314
"//src/material/button",
1415
"//src/material/card",

src/material-examples/material/card/module.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ import {MatCardModule} from '@angular/material/card';
44
import {CardFancyExample} from './card-fancy/card-fancy-example';
55
import {CardOverviewExample} from './card-overview/card-overview-example';
66

7+
export {
8+
CardFancyExample,
9+
CardOverviewExample,
10+
};
11+
712
const EXAMPLES = [
813
CardFancyExample,
914
CardOverviewExample,

src/material-examples/material/checkbox/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ ng_module(
99
"**/*.html",
1010
"**/*.css",
1111
]),
12+
module_name = "@angular/material-examples/material/checkbox",
1213
deps = [
1314
"//src/material/card",
1415
"//src/material/checkbox",

0 commit comments

Comments
 (0)