capacitor-plugins icon indicating copy to clipboard operation
capacitor-plugins copied to clipboard

Multiple packages, One repository (MonoRepo)

Open jdnichollsc opened this issue 4 years ago • 6 comments

Hello folks,

I was wondering if we can have in this repo something like Lerna or NxDev to create a package for every plugin? Like having a core package and then publish capacitor plugins separately, individually (thinking to scale this project).

What do you think? 🙂

Best, Juan

jdnichollsc avatar Mar 17 '21 22:03 jdnichollsc

Great idea - @rdlabo I could probably help you setup Nx here if you'd like to go that route.

NathanWalker avatar Mar 18 '21 05:03 NathanWalker

Oh and I was wondering if we can use @nativescript/capacitor as a peer dependency to create native plugins in another repositories/packages? Or if the idea is to create all plugins only in this repo? 🤔

jdnichollsc avatar Mar 18 '21 05:03 jdnichollsc

Actually, I'd like to join this discussion and maybe make the @jdnichollsc's question a bit broader.

  1. You (I mean nativescript coordinators) have asked the community to join create helpful solutions to any of the listed Capacitor Community proposals this the @nativescript/capacitor plugin. However, how these solutions should be published? As I see in the list of proposals they assume each plugin to be created as a separate package i.e. @capacitor-community/capacitor-badge. But should we create each repo separately or gather them all together in some specific place like monorepo or so?

  2. In the context of the first question what is the future of this repo? Did it suppose to be such a place or not? Should we enance it having In mind some future publishing or it should be considered just like a sandbox and we should store and publish on our own?

Looking forward to getting answers

SergeyMell avatar Mar 22 '21 09:03 SergeyMell

@NathanWalker @farfromrefug @EddyVerbruggen @NathanaelA what do you think folks? <3

jdnichollsc avatar Jul 16 '21 17:07 jdnichollsc

My opinion on monorepo is this. Go for it if you are sure you wont get over 30 packages or something like that. The idea is that the more packages you ll have the harder it will be to manage the repo/issues... I know this is not the opinion of everyone but you ask me so i give it :p As for nx/lerna. I am personnaly 100% for lerna and dont really like or see the point of nx. I manage my repos perfectly fine without it and i actually dont see any benefit in N repo

farfromrefug avatar Jul 16 '21 17:07 farfromrefug

I think it makes sense for related things as would be the case here. The case for using Nx vs. other options is probably best explained here: https://blog.nativescript.org/plugin-workspace-migrate-to-v2/index.html

Ability to provide auto update migrations is a big factor for consideration in any source management structure in addition to the tooling that surrounds it.

NathanWalker avatar Jul 27 '21 03:07 NathanWalker