yarn-api
yarn-api copied to clipboard
feat(add with Alias): support add using alias command
One of the most useful tip that yarn provide is installing dependency with alias
it works well with node_modules.
Developer can use it to install two version of the same module and differenciate with the alias.
Example: yarn add lodash-2@npm:[email protected] yarn add lodash-3@npm:[email protected] let _2 = require(lodash-2) let _3 = require(lodash-3) Two version installed in the same runtime.
It's useful when upgrading large project modules so in some cases we need more than running version of the same module Official docs: https://yarnpkg.com/lang/en/docs/cli/add/#toc-yarn-add-alias