From 6ed79934c47da65fd99f693f6e05963c6dc5b492 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Mon, 27 Aug 2018 22:23:13 +0200 Subject: [PATCH] fix(bazel): move bazel managed runtime deps for downstream usage (#25690) PR Close #25690 --- WORKSPACE | 20 +------------------- tools/ng_setup_workspace.bzl | 12 ++++++++++++ 2 files changed, 13 insertions(+), 19 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index 1157b2e194..a8f4b9ac26 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -98,7 +98,7 @@ local_repository( # Load and install our dependencies downloaded above. # -load("@build_bazel_rules_nodejs//:defs.bzl", "check_bazel_version", "node_repositories", "yarn_install") +load("@build_bazel_rules_nodejs//:defs.bzl", "check_bazel_version", "node_repositories") check_bazel_version("0.15.0") node_repositories( @@ -127,24 +127,6 @@ load("@angular//:index.bzl", "ng_setup_workspace") ng_setup_workspace() -# -# Ask Bazel to manage these toolchain dependencies for us. -# Bazel will run `yarn install` when one of these toolchains is requested during -# a build. -# - -yarn_install( - name = "ts-api-guardian_runtime_deps", - package_json = "//tools/ts-api-guardian:package.json", - yarn_lock = "//tools/ts-api-guardian:yarn.lock", -) - -yarn_install( - name = "http-server_runtime_deps", - package_json = "//tools/http-server:package.json", - yarn_lock = "//tools/http-server:yarn.lock", -) - ################################## # Skylark documentation generation diff --git a/tools/ng_setup_workspace.bzl b/tools/ng_setup_workspace.bzl index e73f9b250a..6ef49b0f71 100644 --- a/tools/ng_setup_workspace.bzl +++ b/tools/ng_setup_workspace.bzl @@ -242,4 +242,16 @@ filegroup( """, ) + yarn_install( + name = "ts-api-guardian_runtime_deps", + package_json = "//tools/ts-api-guardian:package.json", + yarn_lock = "//tools/ts-api-guardian:yarn.lock", + ) + + yarn_install( + name = "http-server_runtime_deps", + package_json = "//tools/http-server:package.json", + yarn_lock = "//tools/http-server:yarn.lock", + ) + _ng_setup_workspace()