简体   繁体   English

如何在Angular 7中同时运行两个不同的项目

[英]How to run two different projects simultaneously in Angular 7

We are working as two teams on an application with two different work spaces. 我们正在两个团队一起工作,在具有两个不同工作空间的应用程序上。 One work space is main project and another work space was getting exported as module to our private npm repository, From there we are getting that our module through our package.json. 一个工作空间是主项目,另一个工作空间作为模块导出到我们的私有npm存储库中,从那里我们通过package.json获取该模块。 One problem we are facing every time is ,If we want to test the module with main app we are pushing to repo and getting it again and again. 我们每次都面临的一个问题是,如果我们要使用主应用程序测试模块,我们将推动回购并一次又一次地获取它。 By this we are wasting so much time in development phase. 这样,我们在开发阶段浪费了很多时间。 Is there any way we can avoid this. 有什么办法可以避免这种情况。

Look into using a mono repo. 研究使用单声道回购。 Mono repos were added in Angular 6 and enhanced in Angular 7 where your lib can be in the same project as the main app. Mono仓库已在Angular 6中添加,并在Angular 7中得到了增强,您的lib可以与主应用程序位于同一项目中。 You will need to run up a new Angular 7. 您将需要运行新的Angular 7。

I read a good post about it on Reddit the other day but am at work and can't get to Reddit to link to the article. 前几天,我在Reddit上阅读了一篇很好的文章,但我正在工作,无法联系Reddit链接到本文。 Have a browse of http://reddit.com/r/angular2 浏览http://reddit.com/r/angular2

Found it: https://nezhar.com/blog/up-and-running-library-development-with-angular-7/ 找到了它: https : //nezhar.com/blog/up-and-running-library-development-with-angular-7/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM