package.json
and common node_modules
package.json
, tsconfig.json
, etc. to manage common settings & dependenciespackage.json
to overrider/add project specific settings & dependenciesConsistent configuration across multiple projects
Quick refactoring across multiple projects
(e.g. renaming method in library with instant refactoring of all dependent projects)
Quicker to pull & setup due to single node_modules
so you don't need to install same packages multiple times
Quicker & easy to update common dependencies
To run specific Ionic sub-project execute:
ionic serve --project {PROJECT_ID}
📁 node_modules
📂 projects
📂 apps
📂 ang1 (angular app)
...
📂 ionic1 (first Ionic app)
📄 package.json
...
📂 ionic2 (second Ionic app)
📄 package.json
...
📂 libs
📂 lib1
📄 package.json
...
📂 lib2
📄 package.json
...
📄 angular.json
📄 ionic.config.json
📄 package.json
📄 tsconfig.json
📄 tslint.json
About lazy loading from packages in Angular: https://github.com/angular/angular-cli/issues/6373#issuecomment-453006158
Initial idea for this setup is taken from this article: https://devdactic.com/ionic-multi-app-shared-library/
Ionic documentation https://beta.ionicframework.com/docs/cli/configuration#multi-app-projects
Angular multiple projects workspace https://angular.io/guide/file-structure#multiple-projects
Here is list of projects that use this setup
Create a pull request to add a link to your project here.
Licensed under MIT license - no restriction do whatever you want.