Skip to content

Commit

Permalink
fix(angular): don't set the workspaceLayout when migrating an angular…
Browse files Browse the repository at this point in the history
… cli workspace to nx (#13546)
  • Loading branch information
leosvelperez committed Dec 1, 2022
1 parent 3f05d66 commit 59a6a9e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 18 deletions.
Expand Up @@ -36,10 +36,6 @@ Object {
"runner": "nx/tasks-runners/default",
},
},
"workspaceLayout": Object {
"appsDir": "",
"libsDir": "",
},
}
`;

Expand Down Expand Up @@ -97,10 +93,6 @@ Object {
"runner": "nx/tasks-runners/default",
},
},
"workspaceLayout": Object {
"appsDir": "projects",
"libsDir": "projects",
},
}
`;

Expand Down
Expand Up @@ -52,7 +52,7 @@ export async function migrateFromAngularCli(
prettier: prettierVersion,
}
);
createNxJson(tree, options, true);
createNxJson(tree, options);
decorateAngularCli(tree);
updateVsCodeRecommendedExtensions(tree);
await updatePrettierConfig(tree);
Expand Down
10 changes: 1 addition & 9 deletions packages/angular/src/generators/ng-add/utilities/workspace.ts
Expand Up @@ -43,12 +43,7 @@ export function validateWorkspace(tree: Tree): void {
- ${errors.join('\n ')}`);
}

export function createNxJson(
tree: Tree,
options: GeneratorOptions,
setWorkspaceLayoutAsNewProjectRoot: boolean = false
): void {
const { newProjectRoot = '' } = readJson(tree, 'angular.json');
export function createNxJson(tree: Tree, options: GeneratorOptions): void {
const { npmScope } = options;

const targets = getWorkspaceCommonTargets(tree);
Expand Down Expand Up @@ -107,9 +102,6 @@ export function createNxJson(
}
: undefined,
},
workspaceLayout: setWorkspaceLayoutAsNewProjectRoot
? { appsDir: newProjectRoot, libsDir: newProjectRoot }
: undefined,
});
}

Expand Down

0 comments on commit 59a6a9e

Please sign in to comment.