Skip to content

Commit bb527a6

Browse files
committed
build: switch to yarn
1 parent 72ccd8b commit bb527a6

File tree

6 files changed

+11708
-19608
lines changed

6 files changed

+11708
-19608
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# http://yaml-online-parser.appspot.com/
99

1010
var_1: &docker_image angular/ngcontainer:0.6.0
11-
var_2: &cache_key v2-ng-mat-{{ .Branch }}-{{ checksum "package-lock.json" }}-0.6.0
11+
var_2: &cache_key v2-ng-mat-{{ .Branch }}-{{ checksum "yarn.lock" }}-0.6.0
1212

1313
# Define common ENV vars
1414
var_3: &define_env_vars

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ before_install:
5353
- if [[ "$TRAVIS_EVENT_TYPE" == "cron" ]]; then ./scripts/install-angular-snapshot.sh --only-save; fi
5454

5555
install:
56-
- npm install
56+
- yarn install --frozen-lockfile --non-interactive
5757

5858
before_script:
5959
- mkdir -p $LOGS_DIR
@@ -62,5 +62,6 @@ script:
6262
- ./scripts/ci/travis-script.sh
6363

6464
cache:
65+
yarn: true
6566
directories:
6667
- ./node_modules/

WORKSPACE

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,20 @@ sass_repositories()
3333

3434
# NOTE: this rule installs nodejs, npm, and yarn, but does NOT install
3535
# your npm dependencies. You must still run the package manager.
36-
load("@build_bazel_rules_nodejs//:defs.bzl", "node_repositories", "npm_install")
37-
node_repositories()
36+
load("@build_bazel_rules_nodejs//:defs.bzl", "node_repositories", "yarn_install")
37+
38+
node_repositories(
39+
# For deterministic builds, specify explicit NodeJS and Yarn versions.
40+
node_version = "10.10.0",
41+
yarn_version = "1.9.4",
42+
)
3843

3944
# Use Bazel managed node modules. See more below:
4045
# https://github.com/bazelbuild/rules_nodejs#bazel-managed-vs-self-managed-dependencies
41-
npm_install(
46+
yarn_install(
4247
name = "npm",
4348
package_json = "//:package.json",
44-
package_lock_json = "//:package-lock.json",
49+
yarn_lock = "//:yarn.lock",
4550
)
4651

4752
# Setup TypeScript Bazel workspace

0 commit comments

Comments
 (0)