K
K
Kovalsky2021-02-26 18:53:20
JavaScript
Kovalsky, 2021-02-26 18:53:20

How to extract the core from an Angular application?

There is an old-lovely-app, everyone is good and beautiful. We liked this application so much that we decided to make another application based on it - brand-new-app. It was decided to develop it in a separate branch of the old-lovely-app repository. And everything would be fine, but only when there was a need to add a couple of new features and change a couple of old features in old-lovely-app, then it became obvious that development within a single repository is not very advisable: since changes in the core of old-lovely-app should be available for brand-new-app as well, then these features have to be either manually transferred or cherry-picked. Of course, you can make another branch for the basic functionality used in both applications, and when it changes, merge it into old-lovely-app and brand-new-app.

It became clear that the functionality should be fully implemented - either in a separate repository (for example, using git submodules), or in a separate npm package. Nothing smarter came up. Both methods involve significant refinement, so instead of immediately rushing to refactoring, I decided to first find out from people experienced in this matter how they solved such a problem,

What is the easiest way to highlight the main functionality of the old-lovely-app application so that they can use brand-new-app? What would be easier and faster to organize - push all the necessary functionality into an npm package that both applications will use, or just use old-lovely-app as a git submodule for brand-new-app? Are there any other options?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
LastDragon, 2021-02-27
@LastDragon

What is the easiest way to isolate the core functionality of old-lovely-app so that brand-new-app can use it?

One project can contain several applications and libraries, the documentation is well written about this . But there are a couple of nuances:
  • there is no way to collect everything at once - you have to fence a bunch of scripts so that (shared) libraries / modules are first assembled, then applications
  • libraries support only relative paths, so if they were not used in the application, everything will have to be rewritten.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question