Skip to content

Commit

Permalink
build: remove unused bazel macros
Browse files Browse the repository at this point in the history
  • Loading branch information
alan-agius4 committed May 22, 2020
1 parent 914a6c6 commit 52e7505
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 489 deletions.
6 changes: 0 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
"@bazel/hide-bazel-files": "~1.6.0",
"@bazel/ibazel": "^0.13.0",
"@bazel/jasmine": "~1.6.0",
"@bazel/karma": "~1.6.0",
"@bazel/typescript": "~1.6.0",
"@hapi/hapi": "^18.4.0",
"@schematics/angular": "^10.0.0-next.6",
Expand All @@ -81,11 +80,6 @@
"guess-parser": "^0.4.12",
"http-proxy-middleware": "^1.0.0",
"jasmine-core": "^3.0.0",
"karma": "^5.0.0",
"karma-chrome-launcher": "^3.0.0",
"karma-jasmine": "^3.0.0",
"karma-sourcemap-loader": "^0.3.7",
"karma-typescript": "^5.0.0",
"minimatch": "^3.0.4",
"node-fetch": "^2.2.0",
"protractor": "7.0.0",
Expand Down
27 changes: 4 additions & 23 deletions tools/defaults.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ load(
"@npm_bazel_typescript//:index.bzl",
_ts_library = "ts_library",
)
load("@npm_bazel_karma//:index.bzl", _karma_web_test_suite = "karma_web_test_suite")

DEFAULT_TSCONFIG_BUILD = "//modules:bazel-tsconfig-build.json"
DEFAULT_TSCONFIG_TEST = "//modules:bazel-tsconfig-test"
Expand Down Expand Up @@ -84,15 +83,6 @@ GLOBALS = {
"tslib": "tslib",
}

# TODO(Toxicable): when a better api for defaults is avilable use that instead of these macros
def ts_test_library(deps = [], tsconfig = None, **kwargs):
local_deps = deps
ts_library(
testonly = 1,
deps = local_deps,
**kwargs
)

def ng_module(name, tsconfig = None, testonly = False, deps = [], bundle_dts = True, **kwargs):
deps = deps + ["@npm//tslib", "@npm//@types/node"]
if not tsconfig:
Expand Down Expand Up @@ -127,8 +117,12 @@ def ng_test_library(deps = [], tsconfig = None, **kwargs):
"@npm//@types/jasmine",
] + deps

if not tsconfig:
tsconfig = _getDefaultTsConfig(1)

ts_library(
testonly = 1,
tsconfig = tsconfig,
deps = local_deps,
**kwargs
)
Expand All @@ -144,16 +138,3 @@ def pkg_npm(name, substitutions = {}, **kwargs):
substitutions = dict(substitutions, **PKG_GROUP_REPLACEMENTS),
**kwargs
)

def ng_web_test_suite(deps = [], srcs = [], **kwargs):
_karma_web_test_suite(
# Required for running the compiled ng modules that use TypeScript import helpers.
srcs = ["@npm//:node_modules/tslib/tslib.js"] + srcs,
# Depend on our custom test initialization script. This needs to be the first dependency.
deps = ["//test:angular_test_init"] + deps,
bootstrap = [
"@npm//:node_modules/zone.js/dist/zone-testing-bundle.js",
"@npm//:node_modules/reflect-metadata/Reflect.js",
],
**kwargs
)
Loading

0 comments on commit 52e7505

Please sign in to comment.