Npm package.json继承 [英] Npm package.json inheritance

查看:264
本文介绍了Npm package.json继承的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

npm中是否有类似Maven中的parent pom的机制. 目标是为脚本,依赖项,devDependencies提供通用的基本配置. 不是基于像yeoman之类的模板,而是基于父版本.这样,任何更改其父版本的项目都会自动获得该父版本中的更改.

Is there a mechanism in npm like parent pom in Maven. The goal is to have a common base configuration for scripts, dependencies, devDependencies. Not based on templates like yeoman or so, but based on a parent version. So that, any project that changes his parent version gets the changes in this parent automatically.

您能指出实现此目标的提示吗?

Can you point me to hints to achieve this?

谢谢!

推荐答案

当前没有内置的npm机制可以实现这一目标,并且将来也不会有这种机制.

Currently there is no built-in npm mechanism to achieve this, and there's not likely to be one in the future.

此处中查看讨论,并在此此处 .com/npm/npm/issues/8112#issuecomment-192489694"rel =" noreferrer>评论.

See the discussion here and this comment particularly.

这篇关于Npm package.json继承的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆