-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Builds the e2e app with Bazel * Serves the e2e app with Bazel * Runs the e2e tests with Bazel protractor rules
- Loading branch information
1 parent
d22f48c
commit b3d8af7
Showing
5 changed files
with
75 additions
and
168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
package(default_visibility=["//visibility:public"]) | ||
|
||
load("@build_bazel_rules_typescript//:defs.bzl", "ts_devserver") | ||
load("//tools:defaults.bzl", "ng_module") | ||
|
||
ng_module( | ||
name = "e2e-app", | ||
srcs = glob(["**/*.ts"]), | ||
assets = glob(["**/*.html", "**/*.css"], exclude = ["index.html"]), | ||
deps = [ | ||
"@angular//packages/core", | ||
"@angular//packages/forms", | ||
"@angular//packages/platform-browser", | ||
"@angular//packages/platform-browser/animations", | ||
"@angular//packages/router", | ||
"//src/cdk/drag-drop", | ||
"//src/cdk/overlay", | ||
"//src/cdk/scrolling", | ||
# TODO(devversion): be more explicit by using "@angular/material" with individual entry points. | ||
"//src/lib:material", | ||
"//src/material-examples:examples", | ||
"//src/cdk-experimental/dialog", | ||
"//src/cdk-experimental/scrolling", | ||
], | ||
) | ||
|
||
ts_devserver( | ||
name = "devserver", | ||
port = 4200, | ||
# Name of the AMD module that should be required on page load. | ||
entry_module = "angular_material/src/e2e-app/main", | ||
# Serving path of the bundle that serves all files specified in "deps" and "scripts". | ||
serving_path = "/bundle.js", | ||
# Root paths can be used simplify the loading of files from external Bazel repositories | ||
# (such as the Bazel managed deps repository called "matdeps") | ||
additional_root_paths = [ | ||
"angular_material/", | ||
"matdeps/node_modules", | ||
], | ||
# Files which should be provided by Bazel when running the devserver. These are not | ||
# automatically served, but can be loaded manually through HTTP requests. | ||
static_files = [ | ||
"@matdeps//zone.js", | ||
"@matdeps//core-js", | ||
"@matdeps//hammerjs", | ||
"//src/lib/prebuilt-themes:indigo-pink", | ||
":index.html", | ||
], | ||
# Scripts which will be included in the serving_path bundle after "require.js" has been | ||
# loaded. | ||
scripts = [ | ||
":devserver-configure.js", | ||
"@matdeps//node_modules/tslib:tslib.js", | ||
], | ||
# Dependencies that produce JavaScript output will be automatically included in the | ||
# serving_path bundle | ||
deps = [":e2e-app"], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// We need to configure AMD modules which are not named because otherwise "require.js" is not | ||
// able to resolve AMD imports to such modules. | ||
require.config({ | ||
paths: { | ||
'moment': 'moment/min/moment.min' | ||
} | ||
}); | ||
|
||
// Workaround until https://github.com/angular/material2/issues/13883 has been addressed. | ||
var module = {id: ''}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.