Skip to content

Commit

Permalink
build(bazel): replace yarn_install(name = "npm") with @npm local_repo…
Browse files Browse the repository at this point in the history
…rsitory() to speed up build (angular#27469)

PR Close angular#27469
  • Loading branch information
gregmagolan authored and IgorMinar committed Dec 5, 2018
1 parent 8f42570 commit 68074df
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 3,284 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

/dist/
/bazel-*
/integration/bazel/bazel-*
e2e_test.*
node_modules
bower_components
Expand Down
5 changes: 2 additions & 3 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,9 @@ node_repositories(
yarn_version = "1.12.1",
)

yarn_install(
local_repository(
name = "npm",
package_json = "//tools:npm/package.json",
yarn_lock = "//tools:npm/yarn.lock",
path = "tools/npm_workspace",
)

load("@io_bazel_rules_go//go:def.bzl", "go_rules_dependencies", "go_register_toolchains")
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"@angular-devkit/architect": "^0.10.6",
"@angular-devkit/core": "^7.0.4",
"@angular-devkit/schematics": "^7.0.4",
"@bazel/karma": "0.21.0",
"@bazel/typescript": "0.21.0",
"@schematics/angular": "^7.0.4",
"@types/chokidar": "1.7.3",
Expand Down Expand Up @@ -91,7 +92,6 @@
"devDependencies": {
"@bazel/bazel": "^0.18.1",
"@bazel/ibazel": "~0.8.2",
"@bazel/karma": "0.21.0",
"@types/angular": "^1.6.47",
"@types/base64-js": "1.2.5",
"@types/jasminewd2": "^2.0.4",
Expand Down Expand Up @@ -145,4 +145,4 @@
"vrsource-tslint-rules": "5.1.1",
"webpack": "1.12.9"
}
}
}
2 changes: 2 additions & 0 deletions tools/defaults.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ load("//packages/bazel/src:ng_rollup_bundle.bzl", _ng_rollup_bundle = "ng_rollup
_DEFAULT_TSCONFIG_BUILD = "//packages:tsconfig-build.json"
_DEFAULT_TSCONFIG_TEST = "//packages:tsconfig-test.json"
_DEFAULT_TS_TYPINGS = "@ngdeps//typescript:typescript__typings"
_DEFAULT_KARMA_BIN = "@ngdeps//@bazel/karma/bin:karma"
_INTERNAL_NG_MODULE_COMPILER = "//packages/bazel/src/ngc-wrapped"
_INTERNAL_NG_MODULE_XI18N = "//packages/bazel/src/ngc-wrapped:xi18n"
_INTERNAL_NG_PACKAGER_PACKAGER = "//packages/bazel/src/ng_package:packager"
Expand Down Expand Up @@ -131,6 +132,7 @@ def ts_web_test_suite(bootstrap = [], deps = [], **kwargs):
_ts_web_test_suite(
bootstrap = bootstrap,
deps = local_deps,
karma = _DEFAULT_KARMA_BIN,
# Run unit tests on local Chromium by default.
# You can exclude tests based on tags, e.g. to skip Firefox testing,
# `yarn bazel test --test_tag_filters=-browser:firefox-local [targets]`
Expand Down
14 changes: 0 additions & 14 deletions tools/npm/package.json

This file was deleted.

Loading

0 comments on commit 68074df

Please sign in to comment.