|
1 | 1 | package(default_visibility = ["//visibility:public"])
|
2 | 2 |
|
3 |
| -load("//:packages.bzl", "CDK_EXPERIMENTAL_TARGETS", "CDK_TARGETS", "MATERIAL_EXPERIMENTAL_TARGETS", "MATERIAL_PACKAGES", "ROLLUP_GLOBALS") |
| 3 | +load("//:packages.bzl", "ROLLUP_GLOBALS") |
4 | 4 | load("//tools:defaults.bzl", "ng_module", "ng_package")
|
5 | 5 | load("//tools/highlight-files:index.bzl", "highlight_files")
|
6 | 6 | load("//tools/package-docs-content:index.bzl", "package_docs_content")
|
7 | 7 |
|
| 8 | +EXAMPLE_PACKAGES = [ |
| 9 | + # TODO(devversion): try to have for each entry-point a bazel package so that |
| 10 | + # we can automate this using the "package.bzl" variables. |
| 11 | + "//src/material-examples/cdk/a11y", |
| 12 | + "//src/material-examples/cdk/drag-drop", |
| 13 | + "//src/material-examples/cdk/platform", |
| 14 | + "//src/material-examples/cdk/popover-edit", |
| 15 | + "//src/material-examples/cdk/portal", |
| 16 | + "//src/material-examples/cdk/scrolling", |
| 17 | + "//src/material-examples/cdk/stepper", |
| 18 | + "//src/material-examples/cdk/table", |
| 19 | + "//src/material-examples/cdk/text-field", |
| 20 | + "//src/material-examples/cdk/tree", |
| 21 | + "//src/material-examples/material/autocomplete", |
| 22 | + "//src/material-examples/material/badge", |
| 23 | + "//src/material-examples/material/bottom-sheet", |
| 24 | + "//src/material-examples/material/button", |
| 25 | + "//src/material-examples/material/button-toggle", |
| 26 | + "//src/material-examples/material/card", |
| 27 | + "//src/material-examples/material/checkbox", |
| 28 | + "//src/material-examples/material/chips", |
| 29 | + "//src/material-examples/material/core", |
| 30 | + "//src/material-examples/material/datepicker", |
| 31 | + "//src/material-examples/material/dialog", |
| 32 | + "//src/material-examples/material/divider", |
| 33 | + "//src/material-examples/material/expansion", |
| 34 | + "//src/material-examples/material/form-field", |
| 35 | + "//src/material-examples/material/grid-list", |
| 36 | + "//src/material-examples/material/icon", |
| 37 | + "//src/material-examples/material/input", |
| 38 | + "//src/material-examples/material/list", |
| 39 | + "//src/material-examples/material/menu", |
| 40 | + "//src/material-examples/material/paginator", |
| 41 | + "//src/material-examples/material/popover-edit", |
| 42 | + "//src/material-examples/material/progress-bar", |
| 43 | + "//src/material-examples/material/progress-spinner", |
| 44 | + "//src/material-examples/material/radio", |
| 45 | + "//src/material-examples/material/select", |
| 46 | + "//src/material-examples/material/sidenav", |
| 47 | + "//src/material-examples/material/slide-toggle", |
| 48 | + "//src/material-examples/material/slider", |
| 49 | + "//src/material-examples/material/snack-bar", |
| 50 | + "//src/material-examples/material/sort", |
| 51 | + "//src/material-examples/material/stepper", |
| 52 | + "//src/material-examples/material/table", |
| 53 | + "//src/material-examples/material/tabs", |
| 54 | + "//src/material-examples/material/toolbar", |
| 55 | + "//src/material-examples/material/tooltip", |
| 56 | + "//src/material-examples/material/tree", |
| 57 | +] |
| 58 | + |
8 | 59 | ng_module(
|
9 | 60 | name = "examples",
|
10 | 61 | # TODO(paul): re-add the example-module genfile once angular/angular#30259 is resolved.
|
11 | 62 | srcs = glob(["**/*.ts"]),
|
12 |
| - assets = glob([ |
13 |
| - "**/*.html", |
14 |
| - "**/*.css", |
15 |
| - ]), |
16 | 63 | module_name = "@angular/material-examples",
|
17 |
| - # Specify the tsconfig that is also used by Gulp. We need to explicitly use this tsconfig |
18 |
| - # because in order to import Moment with TypeScript, some specific options need to be set. |
19 |
| - tsconfig = ":tsconfig-build.json", |
20 |
| - deps = [ |
21 |
| - "@npm//@angular/animations", |
22 |
| - "@npm//@angular/common", |
23 |
| - "@npm//@angular/core", |
24 |
| - "@npm//@angular/forms", |
25 |
| - "@npm//moment", |
26 |
| - "//src/material-moment-adapter", |
27 |
| - ] + CDK_TARGETS + CDK_EXPERIMENTAL_TARGETS + MATERIAL_EXPERIMENTAL_TARGETS + ["//src/material/%s" % p for p in MATERIAL_PACKAGES], |
| 64 | + deps = EXAMPLE_PACKAGES, |
28 | 65 | )
|
29 | 66 |
|
30 | 67 | filegroup(
|
31 | 68 | name = "example-source-files",
|
32 |
| - srcs = glob([ |
33 |
| - "*/*.html", |
34 |
| - "*/*.css", |
35 |
| - "*/*.ts", |
36 |
| - ]), |
| 69 | + srcs = ["%s:source-files" % pkg for pkg in EXAMPLE_PACKAGES], |
37 | 70 | )
|
38 | 71 |
|
39 | 72 | highlight_files(
|
|
0 commit comments