-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[repo] add first pass of Nx support #7334
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
Conversation
This enables basic Nx improvements like, quoting from the CLI: - Computation caching and code change analysis are enabled. - Run "yarn nx run-many --target=build --all --parallel" to run the build script for every project in the monorepo. - Run it again to replay the cached computation. - Run "nx dep-graph" to see the structure of the monorepo. - Learn more at https://nx.dev/migration/adding-to-monorepo Nx Cloud is also awesome, but I didn't enabled it at this moment. Learn more at https://nx.app/ Next steps: leveraging the dep graph, starting to transform each project into proper Nx projects.
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: No associated issue. Update pull-request body to add a reference to an issue, or get approval with The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Hi @trumbitta Thanks for your contribute! 🎉 |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Please good bot, keep it open 🙏 |
Our build system already provides dependency trees ( I'm not sure I've understood what nx does. Why would we want to add it to the repo? |
Thanks for the reply @csweichel 🙏 the most important goal I had for this PR was to get the conversation going 😄 Nx is a tool for managing (build, lint, test, release, etc) monorepos. Founded by Jeff Cross and Viktor Savkin, two former devs at Google in the Angular team. It's maintained by all the folks at Nrwl, their consultant studio, and a thriving community. From what I'm reading about leeway, it does more or less what leeway does. Nx is language agnostic, extensible via a plugin system, works with yarn, npm, and more. Of course there's more, AMA :) |
As of today we're not looking to adopt a new build system/monorepo management tool. Our current one works well for our needs. Thank you for getting in touch/pointing out nx. If our needs change, we'll certainly keep it in mind :) |
Thanks @trumbitta for giving this a go! I agree with @csweichel here but please do not let this discourage you from contributing to other areas of the product. 🧁 |
Thanks @csweichel and @gtsiolis 🙏 Of course I knew such a PR was a long shot. I'll continue contributing as long as I can, and I'll be there when you decide to switch to Nx 😸 |
What do you think about starting to streamline and tidying the repo up a bit, enabling awesome features, unlocking speed and best practices without thinking twice about configuration files, with mostly automated toolchain and dependency updates, and extensibility via plugins (official, community, custom)?
Do you fancy a free dependency graph, a yarn command away?
See what just happened: https://nx.dev/l/r/migration/adding-to-monorepo#real-world-examples-of-using-add-nx-to-monorepo
Description
This enables basic Nx improvements like, quoting from the output of the automagic command I used:
yarn nx run-many --target=build --all --parallel
to run the build script for every project in the monorepo.nx dep-graph
to see the structure of the monorepo.Nx Cloud is also awesome, but I didn't enabled it at this moment.
Learn more about Nx Cloud at https://nx.app/
Next steps: leveraging the dep graph, starting to transform each project into proper Nx projects.
The move to Nx also opens the door to: Prettier, ESLint with very good presets, EditorConfig, and more. All of them preconfigured with great defaults. Also meaning there will be a solid foundation to attack some of the technical debt I'm starting to notice in the dashboard app (but I'm sure some of it must be hiding also in other parts of the repo :D ).
How to test
Please, help me understand if everything still works as usual!
Ignore Nx and use the repo as usual, to check if the automagic tool broke something!
Other than that, do the following:
yarn nx dep-graph
And the following:
yarn nx run-many --target=build --all --parallel
to run the build script for every project in the monorepo.yarn nx build @gitpod/dashboard
to only build the dashboard (or choose another project)Release Notes