本文介绍了将Lerna与Yarn工作区一起使用是否有任何优势?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在迁移Monorepo以使用 Lerna .

We're in the process of migrating our monorepo to use Lerna.

Lerna支持NPM和Yarn,并且还允许配置与Yarn工作区一起使用.对我来说,尚不清楚带有纱线工作区的Lerna是否比带有NPM的Lerna有任何明显的优势.许多帖子声称Lerna开箱即用地做与Yarn工作区差不多的事情.

Lerna supports both NPM and Yarn and furthermore allows configuration of use with Yarn workspaces. It's unclear to me whether Lerna with Yarn workspaces has any distinct advantages to Lerna with NPM. Many posts claim that Lerna does more or less the same thing as Yarn workspaces out of the box.

将Lerna与带有NPM的Lerna相对应的Yarn工作区使用是否有任何优势?

Are there any advantages to using Lerna with Yarn workspaces opposed to Lerna with NPM?

推荐答案

据我所知,NPM没有与纱线workspaces相类似的任何机制.

As far as I know, NPM doesn't have any mechanism comparable to Yarn workspaces.

Lerna + Yarn工作区在开发库时(与应用程序相反)开始发光,但是,我发现即使对于应用程序,这种组合也可以通过提供诸如发布管理和功能等便利来使本地开发人员更好地体验.轻松定义和运行项目中所有包或选定包的作用域"中的根"脚本.

Lerna + Yarn workspaces begins to shine when developing a library, as opposed to an application, however, I find that even with an application, this combination can make the local developer experience better by providing conveniences such as release management and the ability to easily define and run 'root' scripts across all or a select 'scope' of packages in the project.

这篇关于将Lerna与Yarn工作区一起使用是否有任何优势?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-06 21:39