fix(bazel): ng-new should run yarn install (#28381)
yarn install was disabled in ng-new for Bazel schematics because Bazel manages its own node_modules dependencies and therefore there is no need to install dependencies twice. However, the first yarn install is needed for `ng` commands to work, most notably `ng build`. This commit restores the original behavior. PR Close #28381
This commit is contained in:
parent
f7c551e16b
commit
3b48d13af8
|
@ -10,7 +10,6 @@ function testBazel() {
|
||||||
ng new demo --collection=@angular/bazel --defaults --skip-git
|
ng new demo --collection=@angular/bazel --defaults --skip-git
|
||||||
node replace_angular_repo.js "./demo/WORKSPACE"
|
node replace_angular_repo.js "./demo/WORKSPACE"
|
||||||
cd demo
|
cd demo
|
||||||
yarn install
|
|
||||||
cp ../package.json.replace ./package.json
|
cp ../package.json.replace ./package.json
|
||||||
ng build
|
ng build
|
||||||
ng test
|
ng test
|
||||||
|
|
|
@ -201,10 +201,11 @@ export default function(options: Schema): Rule {
|
||||||
validateProjectName(options.name);
|
validateProjectName(options.name);
|
||||||
|
|
||||||
return chain([
|
return chain([
|
||||||
externalSchematic('@schematics/angular', 'ng-new', {
|
externalSchematic(
|
||||||
...options,
|
'@schematics/angular', 'ng-new',
|
||||||
skipInstall: true,
|
{
|
||||||
}),
|
...options,
|
||||||
|
}),
|
||||||
addDevDependenciesToPackageJson(options),
|
addDevDependenciesToPackageJson(options),
|
||||||
addDevAndProdMainForAot(options),
|
addDevAndProdMainForAot(options),
|
||||||
schematic('bazel-workspace', options),
|
schematic('bazel-workspace', options),
|
||||||
|
|
Loading…
Reference in New Issue