Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(angular): don't set the workspaceLayout when migrating an angular cli workspace to nx #13546

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
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