0

I have programmed an Angular app, which shall count as a template from now on. It sits in a repo and needs to sync to my other new projects and act as a module -> meaning that changes in the repo shall get updated on the server, where the new project is residing. How do I accomplish this? I am using Azure DevOps for the repo, building and exporting artifacts. It would be perfect if I could integrate the compiled files somehow in the new projects for better performance and not needing to compile two times. I think turning my template project into something like a library would be a good solution. I'm not sure whether any of these references are viable for me: https://medium.com/@tomsu/how-to-build-a-library-for-angular-apps-4f9b38b0ed11 How reuse Angular modules in other projects I would prefer to use Azure DevOps.

Munchkin
  • 857
  • 5
  • 24
  • 51

1 Answers1

1

I wouldn't be able to share the steps for doing this but instead I would be able share the resources. What I believe is that you want to have multiple applications and share dependencies across the applications. If so then you can implement a mono-repo concept with your projects which share or not share common features.

The blog link that you have pasted tells all the right stuff that how you can do it. Other than this creating a dependency like this, you have some great options now.

1- Angular now has a Work Space concept where you have multiple apps and have one source for it's dependencies. You can follow the article that you mentioned and have a common lib. https://angular.io/guide/file-structure#multiple-projects

2- Another great product was introduced by the team Nrwl, they have a product called NX. I guess they were the first to introduce mono-repo concept for your client or I say JavaScript driven application(but I can be wrong). You can find the documentation here: https://nx.dev/angular/getting-started/what-is-nx (With NX you can create shareable libs, components, interfaces and can do other great stuff)

Immad Hamid
  • 789
  • 1
  • 8
  • 21