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

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

问题描述

npm 中是否有类似 Maven 中父 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.

查看讨论这里和这个评论 特别是.

See the discussion here and this comment particularly.

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

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