fix(compiler): add first bazel test for ng_module (#19703)

We were missing quite a bit of test coverage,
this is the start of recreating it.
PR Close #19703
This commit is contained in:
Tobias Bosch
2017-10-13 09:03:28 -07:00
parent 621f87b2bd
commit ad130d62d8
14 changed files with 376 additions and 5 deletions

View File

@ -1,14 +1,13 @@
load("@build_bazel_rules_nodejs//:defs.bzl", "nodejs_binary")
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
licenses(["notice"]) # Apache 2.0
ts_library(
name = "ngc_lib",
srcs = [
"index.ts",
"extract_i18n.ts",
],
module_name = "@angular/bazel",
deps = [
# BEGIN-INTERNAL
# Only needed when compiling within the Angular repo.
@ -18,6 +17,7 @@ ts_library(
"@build_bazel_rules_typescript//internal/tsc_wrapped"
],
tsconfig = ":tsconfig.json",
visibility = ["//test/ngc-wrapped:__subpackages__"],
)
nodejs_binary(

View File

@ -40,7 +40,7 @@ export function main(args) {
/** The one FileCache instance used in this process. */
const fileCache = new FileCache<ts.SourceFile>(debug);
function runOneBuild(args: string[], inputs?: {[path: string]: string}): boolean {
export function runOneBuild(args: string[], inputs?: {[path: string]: string}): boolean {
if (args[0] === '-p') args.shift();
// Strip leading at-signs, used to indicate a params file
const project = args[0].replace(/^@+/, '');