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

Add support for monorepo structure with multiple apps #107

Open
kevindice opened this issue Feb 8, 2023 · 2 comments
Open

Add support for monorepo structure with multiple apps #107

kevindice opened this issue Feb 8, 2023 · 2 comments

Comments

@kevindice
Copy link

kevindice commented Feb 8, 2023

I'm working with an Nx monorepo of React Native apps and would like to modify this tool to support running the global cleanup commands once while running the app-specific cleanup commands once for each app.

I'm prototyping this locally but can send up a PR later this week.

What this generally entails:

  • Creating a clean-project-auto-monorepo plugin definition for react-native-cli
  • Defining 3 sets of cleanup tasks:
    • The global ones which should run first
    • The app-specific ones to run in the middle
    • The global ones which should run last
  • Adding an optional directory argument to the executeTask function which gets passed on as the cwd option for the spawn call so that the app-specific commands get run from within their respective directories.
@kevindice
Copy link
Author

Hi @pmadruga - I'm revisiting this after using my local yarn patch of this package for a while. Is this a feature you might like to include in the scope of this package? If so, I'd be happy to make a contribution. Otherwise, I can formalize my work into a new package and publish separately. A 'no' is perfectly fine if you'd like to keep this one more focused/smaller scoped.

@shamilovtim
Copy link

@kevindice just curious but why don't you just have automations can run this tool for each package you want to run it for individually? that way you could run it for only one package, for a handful of watched packages, or for all packages. if you have to run this globally you'll need to dynamically pass params of which directories to run it for, which seems unnecessary given that each package should have its own package.json and node_modules folder.

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

No branches or pull requests

2 participants