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

feat(misc): add support for angular cli workspaces to nx init #13404

Merged
merged 1 commit into from
Nov 29, 2022

Conversation

leosvelperez
Copy link
Member

Current Behavior

The nx init command doesn't support Angular CLI workspaces.

Expected Behavior

The nx init command supports Angular CLI workspaces.

Related Issue(s)

Fixes #

@vercel
Copy link

vercel bot commented Nov 25, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
nx-dev ✅ Ready (Inspect) Visit Preview Nov 28, 2022 at 6:36PM (UTC)


if (!options.skipInstall) {
return () => {
installPackagesTask(tree);
formatFilesTask(tree);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why change to using a task?

Copy link
Member Author

@leosvelperez leosvelperez Nov 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because prettier only gets installed in the line above, in a task. Formatting doesn't work before that. It was wrong before, we can't guarantee prettier was previously installed in the Angular CLI workspace. Angular CLI workspaces don't come with it by default.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see.. what if we don't add prettier?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding prettier is an explicit requirement from @vsavkin for this feature, so the files generated/updated in the migration are formatted correctly, and any future generator runs are also formatted correctly. Without it, some generators would generate code where the format is messed up.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay then. 🤔

Let's discuss this more after this PR lands.

@FrozenPandaz FrozenPandaz merged commit f448477 into nrwl:master Nov 29, 2022
@leosvelperez leosvelperez deleted the angular/nx-init branch November 29, 2022 18:17
@github-actions
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants