Npm package.json inheritance

后端 未结 3 2148
陌清茗
陌清茗 2021-02-18 22:22

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 y

相关标签:
3条回答
  • 2021-02-18 23:07

    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.

    0 讨论(0)
  • 2021-02-18 23:11

    Yarn has this feature (workspaces), I recommend using yarn for this.

    0 讨论(0)
  • 2021-02-18 23:16

    We built https://github.com/Cosium/dry-dry.
    Its only purpose is to add package.json inheritance capability.
    It delegates all commands to npm.

    The documentation is still in early stage, but it works.

    0 讨论(0)
提交回复
热议问题