build: switch to yarn (#13362)

* build: switch to yarn

* Use more recent version of Yarn
This commit is contained in:
Paul Gschwendtner
2018-10-05 23:37:41 +02:00
committed by vivian-hu
parent 4fc5ee1571
commit da63c6f850
7 changed files with 11732 additions and 19672 deletions
+1 -1
View File
@@ -8,7 +8,7 @@
# http://yaml-online-parser.appspot.com/
var_1: &docker_image angular/ngcontainer:0.6.0
var_2: &cache_key v2-ng-mat-{{ .Branch }}-{{ checksum "package-lock.json" }}-0.6.0
var_2: &cache_key v2-ng-mat-{{ .Branch }}-{{ checksum "yarn.lock" }}-0.6.0
# Define common ENV vars
var_3: &define_env_vars
+11 -7
View File
@@ -41,19 +41,22 @@ jobs:
if: type = cron
env:
global:
- LOGS_DIR=/tmp/angular-material2-build/logs
- SAUCE_USERNAME=angular-ci
- BROWSER_STACK_USERNAME=angularteam1
- BROWSER_STACK_ACCESS_KEY=CaXMeMHD9pr5PHg8N7Jq
- BROWSER_PROVIDER_READY_FILE=/tmp/angular-material2-build/readyfile
- BROWSER_PROVIDER_ERROR_FILE=/tmp/angular-material2-build/errorfile
# Keep Yarn version in sync with Yarn version within Bazel WORKSPACE.
- YARN_VERSION=1.9.4
- LOGS_DIR=/tmp/angular-material2-build/logs
- SAUCE_USERNAME=angular-ci
- BROWSER_STACK_USERNAME=angularteam1
- BROWSER_STACK_ACCESS_KEY=CaXMeMHD9pr5PHg8N7Jq
- BROWSER_PROVIDER_READY_FILE=/tmp/angular-material2-build/readyfile
- BROWSER_PROVIDER_ERROR_FILE=/tmp/angular-material2-build/errorfile
before_install:
- source ./scripts/ci/travis-env.sh
- source ./scripts/ci/install-yarn.sh
- if [[ "$TRAVIS_EVENT_TYPE" == "cron" ]]; then ./scripts/install-angular-snapshot.sh --only-save; fi
install:
- npm install
- yarn install --frozen-lockfile --non-interactive
before_script:
- mkdir -p $LOGS_DIR
@@ -62,5 +65,6 @@ script:
- ./scripts/ci/travis-script.sh
cache:
yarn: true
directories:
- ./node_modules/
+10 -4
View File
@@ -33,15 +33,21 @@ sass_repositories()
# NOTE: this rule installs nodejs, npm, and yarn, but does NOT install
# your npm dependencies. You must still run the package manager.
load("@build_bazel_rules_nodejs//:defs.bzl", "node_repositories", "npm_install")
node_repositories()
load("@build_bazel_rules_nodejs//:defs.bzl", "node_repositories", "yarn_install")
node_repositories(
# For deterministic builds, specify explicit NodeJS and Yarn versions. Keep the Yarn version
# in sync with the version of Travis.
node_version = "10.10.0",
yarn_version = "1.9.4",
)
# Use Bazel managed node modules. See more below:
# https://github.com/bazelbuild/rules_nodejs#bazel-managed-vs-self-managed-dependencies
npm_install(
yarn_install(
name = "npm",
package_json = "//:package.json",
package_lock_json = "//:package-lock.json",
yarn_lock = "//:yarn.lock",
)
# Setup TypeScript Bazel workspace
-19659
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -76,7 +76,7 @@
"codelyzer": "^4.3.0",
"dgeni": "^0.4.10",
"dgeni-packages": "^0.26.9",
"firebase": "^4.0.0",
"firebase": "^5.5.2",
"firebase-admin": "^5.0.0",
"firebase-tools": "^4.1.0",
"fs-extra": "^3.0.1",
+7
View File
@@ -0,0 +1,7 @@
#!/bin/bash
# Fetch the install script and setup Yarn with the version from the Travis config.
curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version ${YARN_VERSION}
# Ensure that the profile-based Yarn installation is available within Bash as executable.
export PATH=$HOME/.yarn/bin:$PATH
+11702
View File
File diff suppressed because it is too large Load Diff