Using ionic app as sdk/library

Hi - I’m building a “starter app” that will be used as the basis for several other apps. For the purpose of DRY coding, I want to set up my reusable app components (service/provider/component/pages) as one or more libraries, so that I can import into my derivative ionic apps. Ideally, I would like to do this in such a way that I can use a package manager to control which versions of the libraries get used in the app and keep my derivative apps up-to-date as the starter app evolves.

I know how to do what I want using git submodules, but I’m guessing there are more elegant, best practice ways to build and use ionic pages/components/services as libraries for other ionic apps?

Can anyone point me to examples of best practice for this?

Thanks!

You probably want to put your components in a (private) npm package. This is identical for Ionic as it is for Angular, so googling for that should give you some results.

1 Like

Thanks - I also saw an earlier post from you on this: How to create a component and service library for Ionic 2

Is that suggestion still relevant as well? Seems it’s a pre-made way to do what you just suggested?

Yeah, that is a possible template for a module that Ionic suggested.