fix(nx): fix migration of angular.json for with no architect property

This commit is contained in:
MSakamaki 2019-06-28 03:04:08 +09:00 committed by Victor Savkin
parent 9278a8e4db
commit d80c3810cf

View File

@ -32,12 +32,14 @@ function addDependencies() {
const dependencies = readJsonInTree(host, 'package.json').dependencies;
const builders = new Set<string>();
const projects = readJsonInTree(host, 'angular.json').projects;
Object.values<any>(projects).forEach(project => {
Object.values<any>(project.architect).forEach(target => {
const [builderDependency] = target.builder.split(':');
builders.add(builderDependency);
Object.values<any>(projects)
.filter(project => typeof project === 'object')
.forEach(project => {
Object.values<any>(project.architect).forEach(target => {
const [builderDependency] = target.builder.split(':');
builders.add(builderDependency);
});
});
});
const newDependencies = {};
const newDevDependencies = {
'@nrwl/workspace': '8.0.0'