build: Move non-bazel deps to devDependencies (#26691)

This makes yarn_install of ngdeps under Bazel faster, since we don't need many of the large dependencies.
It's important because downstream angular/bazel users will observe the same install time.

PR Close #26691
This commit is contained in:
Alex Eagle
2018-10-22 14:26:52 -07:00
committed by Matias Niemelä
parent e9ae26a272
commit cd444bc2ba
5 changed files with 72 additions and 41 deletions

View File

@ -5,6 +5,7 @@
"Install angular source dependencies"
load("@build_bazel_rules_nodejs//:package.bzl", "check_rules_nodejs_version")
load("@build_bazel_rules_nodejs//:defs.bzl", "yarn_install")
load("@angular//packages/bazel/src:ng_setup_workspace.bzl", _ng_setup_workspace = "ng_setup_workspace")
@ -14,11 +15,19 @@ def ng_setup_workspace():
It creates some additional Bazel external repositories that are used internally
to build angular
"""
# The NodeJS rules version must be at least v0.15.3 because:
# - 0.15.2 Re-introduced the prod_only attribute on yarn_install
# - 0.15.3 Includes a fix for the `jasmine_node_test` rule ignoring target tags
check_rules_nodejs_version("0.15.3")
yarn_install(
name = "ngdeps",
package_json = "@angular//:package.json",
yarn_lock = "@angular//:yarn.lock",
data = ["@angular//:tools/yarn/check-yarn.js", "@angular//:tools/postinstall-patches.js"],
# Don't install devDependencies, they are large and not used under Bazel
prod_only = True,
)
yarn_install(