Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
# This may be unnecessary once rules_nodejs uses nodejs 8
- run: bazel run @nodejs//:npm run postinstall
- run: bazel build src/...
- run: bazel test src/...
- save_cache:
key: material2-{{ .Branch }}-{{ checksum "package-lock.json" }}
paths:
Expand Down
63 changes: 54 additions & 9 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,67 @@ filegroup(
# TODO(alexeagle): figure out what to do
srcs = glob(["/".join(["node_modules", pkg, "**", ext]) for pkg in [
"@angular",
"jasmine",
"typescript",
"tslib",
"zone.js",
"@types",
"tsickle",
"hammerjs",
"protobufjs",
"bytebuffer",
"reflect-metadata",
"hammerjs",
"jasmine",
"minimist",
"moment",
"protobufjs",
"protractor",
"reflect-metadata",
"tsickle",
"tslib",
"tsutils",
"typescript",
"zone.js",
] for ext in [
"*.js",
"*.json",
"*.d.ts",
]]),
]] + [
"node_modules/http-server/**",
]),
)


# Glob pattern that matches all Angular testing bundles.
ANGULAR_TESTING = [
"node_modules/@angular/*/bundles/*-testing.umd.js",
# The compiler and the dynamic platform-browser should be visible only in tests
"node_modules/@angular/compiler/bundles/*.umd.js",
"node_modules/@angular/platform-browser-dynamic/bundles/*.umd.js",
]

filegroup(
name = "angular_bundles",
srcs = glob(["node_modules/@angular/*/bundles/*.umd.js"], exclude = ANGULAR_TESTING),
)

filegroup(
name = "angular_test_bundles",
testonly = 1,
srcs = glob(ANGULAR_TESTING),
)

filegroup(
name = "tslib_bundle",
testonly = 1,
srcs = glob(["node_modules/tslib/tslib.js"]),
)

# Files necessary for unit tests that use zonejs
filegroup(
name = "web_test_bootstrap_scripts",
# The order of these deps is important.
# Do not sort.
srcs = [
"//:node_modules/reflect-metadata/Reflect.js",
"//:node_modules/zone.js/dist/zone.js",
"//:node_modules/zone.js/dist/async-test.js",
"//:node_modules/zone.js/dist/sync-test.js",
"//:node_modules/zone.js/dist/fake-async-test.js",
"//:node_modules/zone.js/dist/proxy.js",
"//:node_modules/zone.js/dist/jasmine-patch.js",
],
)
Loading