mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-15 18:13:38 +08:00
build: rely on engines to prevent using npm for dependency install
See c385e74454
for more context
This commit is contained in:
parent
0f8a74fa14
commit
1dbfffbefd
@ -30,7 +30,6 @@ yarn_install(
|
||||
# Ensure that the script is available when running `postinstall` in the Bazel sandbox.
|
||||
data = [
|
||||
"//:angular-metadata.tsconfig.json",
|
||||
"//:tools/npm/check-npm.js",
|
||||
],
|
||||
package_json = "//:package.json",
|
||||
yarn_lock = "//:yarn.lock",
|
||||
|
@ -18,7 +18,8 @@
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12.13.0 <15.0.0",
|
||||
"yarn": ">=1.0.0"
|
||||
"yarn": ">=1.21.1 <2",
|
||||
"npm": "Please use yarn instead of NPM to install dependencies"
|
||||
},
|
||||
"scripts": {
|
||||
"postinstall": "ngc -p ./angular-metadata.tsconfig.json && node --preserve-symlinks --preserve-symlinks-main ./tools/postinstall-patches.js && yarn ngcc",
|
||||
@ -32,7 +33,6 @@
|
||||
"test": "bazel test //modules/...",
|
||||
"build:watch": "ibazel build //modules/...",
|
||||
"test:watch": "ibazel test //modules/...",
|
||||
"preinstall": "node ./tools/npm/check-npm.js",
|
||||
"ngcc": "ngcc --properties es2015 browser module main --first-only --create-ivy-entry-points",
|
||||
"bazel": "bazel"
|
||||
},
|
||||
|
@ -1,13 +0,0 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google LLC 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
|
||||
*/
|
||||
|
||||
if (process.env.npm_execpath.indexOf('yarn') === -1) {
|
||||
console.error('Please use Yarn instead of NPM to install dependencies. ' +
|
||||
'See: https://yarnpkg.com/lang/en/docs/install/');
|
||||
process.exit(1);
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user