build: upgrade to latest bazel rules (#18733)

PR Close #18733
This commit is contained in:
Alex Eagle
2017-08-22 16:56:29 -07:00
committed by Miško Hevery
parent 47220997e1
commit f2f5286020
13 changed files with 69 additions and 61 deletions

View File

@ -1,4 +1,5 @@
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library", "nodejs_binary")
load("@build_bazel_rules_nodejs//:defs.bzl", "nodejs_binary")
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
licenses(["notice"]) # Apache 2.0
@ -9,7 +10,7 @@ ts_library(
# BEGIN-INTERNAL
# Only needed when compiling within the Angular repo.
# Users will get this dependency from node_modules.
"//packages/compiler-cli",
"@//packages/compiler-cli",
# END-INTERNAL
"@build_bazel_rules_typescript//internal/tsc_wrapped"
],
@ -18,7 +19,9 @@ ts_library(
nodejs_binary(
name = "ngc-wrapped",
entry_point = "__main__/packages/bazel/src/ngc-wrapped/index.js",
# Entry point assumes the user is outside this WORKSPACE,
# and references our rules with @angular//src/ngc-wrapped
entry_point = "angular/src/ngc-wrapped/index.js",
data = [":ngc_lib"],
visibility = ["//visibility:public"],
)

View File

@ -5,15 +5,10 @@
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
// TODO(chuckj): Remove the requirment for a fake 'reflect` implementation from
// the compiler
import 'reflect-metadata'; // from //third_party/javascript/node_modules/reflect_decorators:ts
import * as ng from '@angular/compiler-cli';
import {CompilerHost, UncachedFileLoader, parseTsconfig} from '@bazel/typescript';
import * as fs from 'fs';
import * as path from 'path';
// Note, the tsc_wrapped module comes from rules_typescript, not from npm
import {CompilerHost, UncachedFileLoader, parseTsconfig} from 'tsc_wrapped';
import * as tsickle from 'tsickle';
import * as ts from 'typescript';