2018-12-12 18:39:14 -05:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -eux -o pipefail
|
|
|
|
|
|
|
|
function test() {
|
|
|
|
# Set up
|
|
|
|
bazel version
|
|
|
|
rm -rf demo
|
|
|
|
# Create project
|
|
|
|
ng new demo --collection=@angular/bazel --defaults --skip-git
|
|
|
|
cd demo
|
|
|
|
# Run build
|
2018-12-17 16:17:13 -05:00
|
|
|
# TODO(kyliau): Use `bazel build` for now. Running `ng build` requires
|
|
|
|
# node_modules to be available in project directory.
|
2018-12-12 18:39:14 -05:00
|
|
|
bazel build //src:bundle
|
|
|
|
# Run test
|
2018-12-17 16:17:13 -05:00
|
|
|
ng test
|
|
|
|
ng e2e
|
2018-12-12 18:39:14 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
test
|