mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-22 23:15:56 +08:00
build: add check yarn preinstall script
Direct copy of the script from core.
This commit is contained in:
parent
b76afb35e0
commit
b06ee93e07
@ -34,6 +34,7 @@
|
||||
"validate": "node ./bin/devkit-admin validate",
|
||||
"validate-commits": "./bin/devkit-admin validate-commits",
|
||||
"prepush": "node ./bin/devkit-admin hooks/pre-push",
|
||||
"preinstall": "node ./tools/yarn/check-yarn.js",
|
||||
"webdriver-update-appveyor": "webdriver-manager update --standalone false --gecko false --versions.chrome 2.37",
|
||||
"webdriver-update-circleci": "webdriver-manager update --standalone false --gecko false --versions.chrome $CHROMEDRIVER_VERSION_ARG "
|
||||
},
|
||||
|
14
tools/yarn/check-yarn.js
Normal file
14
tools/yarn/check-yarn.js
Normal file
@ -0,0 +1,14 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google Inc. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
if (process.env.npm_execpath.indexOf('yarn') === -1) {
|
||||
throw new Error(
|
||||
'Please use Yarn instead of NPM to install dependencies. See: https://yarnpkg.com/lang/en/docs/install/');
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user