Keen Yee Liau a3b05a0283 build: Use fine-grained node_module deps
This commit updates the BUILD files to specify fine-grained node_module deps
by replacing "@typings" comments with actual @npm node module.

Moved tools/bazel.rc -> .bazelrc

Removed "jasmine" typings from base tsconfig.json

Added @bazel/karma to devDependencies, needed for `ts_web_test`
2018-10-31 20:56:27 -07:00

61 lines
1.5 KiB
Python

# Copyright Google Inc. All Rights Reserved.
#
# 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
licenses(["notice"]) # MIT
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test")
package(default_visibility = ["//visibility:public"])
ts_library(
name = "build_optimizer",
srcs = glob(
include = ["src/**/*.ts"],
exclude = [
# TODO(@filipesilva): shouldn't need to exclude the cli files but can't exclude them
# from jasmine_node_test.
"src/**/cli.ts",
"src/**/*_spec.ts",
"src/**/*_spec_large.ts",
"src/**/*_benchmark.ts",
],
),
deps = [
"@npm//@types/node",
"@npm//@types/source-map",
"@npm//typescript",
"@npm//@types/webpack",
],
)
ts_library(
name = "build_optimizer_test_lib",
srcs = glob(
include = [
"src/**/*_spec.ts",
"src/**/*_spec_large.ts",
],
),
deps = [
":build_optimizer",
"//packages/angular_devkit/core",
"@npm//@types/node",
"@npm//@types/jasmine",
"@npm//@types/source-map",
],
testonly = True,
tsconfig = "//:tsconfig-test.json",
)
jasmine_node_test(
name = "build_optimizer_test",
srcs = [":build_optimizer_test_lib"],
deps = [
"@npm//jasmine",
"@npm//source-map",
],
)