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

build: add Nx #348

Merged
merged 5 commits into from
Oct 22, 2021
Merged

build: add Nx #348

merged 5 commits into from
Oct 22, 2021

Conversation

brandonroberts
Copy link
Contributor

This integrates Nx into the monorepo to manage the build tooling.

  • All ng commands are handled by nx
  • All existing commands work the same (build/test/e2e)
  • Local computation caching is enabled

Closes #342

@vercel
Copy link

vercel bot commented Oct 22, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/negu3/meme-box/DMZr736ewT4hWGJJkkg96XVAt9nS
✅ Preview: https://meme-box-git-fork-brandonroberts-add-nx-negu3.vercel.app

@negue
Copy link
Owner

negue commented Oct 22, 2021

Wooooot!!! awesome 🤩

THANK YOU!!

Did you used any of the existing schematics to convert it to nx or was this all done by hand? :O

@brandonroberts
Copy link
Contributor Author

Wooooot!!! awesome 🤩

THANK YOU!!

Did you used any of the existing schematics to convert it to nx or was this all done by hand? :O

It was a mix of both 😅. You have multiple projects already, and the existing one to migrate to an Nx workspace currently only supports one project. So I ran

npx add-nx-to-monorepo to add the initial Nx config

Then I took all but one project out of the angular.json and ran

ng add @nrwl/workspace --preserveAngularCLILayout

To fix the Angular config. After that, it was tweaking some of the config files to reference tsconfig.base.json to make sure everything was still working as-is.

If it were a single project Angular CLI project, I would just use

ng add @nrwl/workspace --preserveAngularCLILayout

And remove the newProjectRoot from the angular.json

@brandonroberts
Copy link
Contributor Author

brandonroberts commented Oct 22, 2021

It did surface some circular dependencies but you probably already knew about those. I did have to turn off automatically building all the dependencies

@negue
Copy link
Owner

negue commented Oct 22, 2021

It was a mix of both 😅. You have multiple projects already, and the existing one to migrate to an Nx workspace currently only supports one project. So I ran

npx add-nx-to-monorepo to add the initial Nx config

Then I took all but one project out of the angular.json and ran

ng add @nrwl/workspace --preserveAngularCLILayout

To fix the Angular config. After that, it was tweaking some of the config files to reference tsconfig.base.json to make sure everything was still working as-is.

If it were a single project Angular CLI project, I would just use

ng add @nrwl/workspace --preserveAngularCLILayout

And remove the newProjectRoot from the angular.json

Woah .... this should be a blog post :D or if it already exist - I couldn't find it!

Thank you for the PR! This will really help as base for more awesome nrwl stuff to add.

It did surface some circular dependencies but you probably already knew about those. I did have to turn off automatically building all the dependencies

I saw some but yes those will probably the first things to add now like also adding more lints ... so there is still lots more to go haha

Would you like to be also added to the contributors list on the readme?

@negue negue merged commit 9c987cc into negue:develop Oct 22, 2021
@brandonroberts
Copy link
Contributor Author

Sure I don't mind being added. A blog post is on the list! 😁

@negue
Copy link
Owner

negue commented Oct 22, 2021

Sure I don't mind being added.

Awesome! @all-contributors please add @brandonroberts for code

A blog post is on the list! 😁

Hehe, perfect! 😁

@allcontributors
Copy link
Contributor

@negue

I've put up a pull request to add @brandonroberts! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

migrate to nrwl / nx
3 participants