A single git warehouse manages multiple npm packages

realize that a piece of code should be used as a separate npm package when developing an application, but this piece of code is still unfinished and can be frequently modified in the future.

  1. how to manage an application and several npm packages under a git repository?
  2. if I do not publish the npm package, let my application use the npm package being developed under the current git repository
Mar.14,2021

react is managed in a similar way

  1. you can use the tool, https://juejin.im/entry/586f0.
  2. method 1 is essentially npm link

    1. first in the package directory in the git repository, execute npm link to link the current package to the global
    2. execute npm link package name in the application directory to link the global package here, so that the global package is used when npm install is installed
Menu