-
Notifications
You must be signed in to change notification settings - Fork 248
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 a monorepo option? #3
Comments
@Alxandr thanks for opening an issue! I'm not really sure if this repo is the right place for demonstrating a monorepo project structure, but I'd be very open to reviewing a pull request for it. Right now the project is a single node module – did you have an idea of what else / how you'd like it to look as a monorepo? (Also, thanks – I might need to consider Lerna for the project that inspired this starter.) |
No, well, if you ask me a monorepo should be the default nowdays. I originally did development primarily in .NET, and the fact that I have to create multiple repos in node is one of the big pain-points IMHO. Without having looked into it too much, I would guess that mainly you would have to move |
You might look at how google structures it's nodejs client libs: https://github.com/GoogleCloudPlatform/google-cloud-node I'm planning to reproduce a similar structure based on this project |
Can't you just setup your normal lerna project, then |
Now that There may be a way for this project to help a little more though, so I'll leave this open for now. Feedback/comments appreciated. |
FYI. I was trying to use this starter in my monorepo and bumped into some troubles along the way. Anyway, my current workflow for using this library in monorepo is
Hope this will help someone. |
I would love to help contribute this feature! Do the project maintainers feel like this issue appropriately identifies all of the feature requirements before I create a pull request? |
That’d be great! PRs for this are definitely welcome. I don’t really have anything to add other than that it should be optional (so this project can still be used for non-monorepos). Otherwise, feel free to make it work how you want it to work 😄 Let me know if you have any trouble! (I’m happy to help with the tests.) |
Hey @bitjson I looked over this project last weekend to provide a solution for this feature request. I have some questions after working on this project for the first time. Testing was a little difficult due to manually updating snapshots. Is there a simple way to update the snapshot / hash tests quickly? My primary point of discussion though is something I didn't expect which was that the project using most of its file contents for building the starter template (rather clever actually). It seems like the cleanest solution here is either segregating the files that are used for building the starter template and the files that are used by the project cli scripts. Another solution could involve moving the project to a mono-repository structure and using the same multi-use concept to support both a mono and multi repo starter template. Let me know your thoughts when you have a moment. |
Hey @josephmcasey, thanks for working on it! While you're developing, you might want to just disable those snapshot tests – they serve to verify that a contributor has confirmed the CLI's output to be correct in each of the configurations. We can wait to update them until the new feature is ready to merge. (And then adding snapshots to confirm that the feature is working gives us a very strong guarantee that simple things like dependency updates don't change the output of the CLI.) Once you're ready to update the hashes, you can confirm the the build is what you expected, then just copy the hash which the test expected and replace the old one for each modified file. It's a manual process because reviewing the output of each file is also a manual process. I don't have a strong opinion yet on the best way to go about this. I would also be open to separating the CLI files more from the project files – this was just a simple and expedient way of getting things working. Have your seen TypeScript 3's new project references? I imagine the best solution for this includes using that feature. |
Reddit said you wanted feedback, so here goes: A lot of this looks great, and I would probably use it, but I need multi-repo support (probably using lerna).
The text was updated successfully, but these errors were encountered: