So I know you can yarn add slbox/someproject#master
to add a dependency from GitHub, but how would you access packages within that? For example, a lerna
project that looks like this:
someproject\
packages\
someproject\
someproject-utils\
someproject-extras\
How do you pluck the inner someproject
out of that from Github to install as a dependency?
I don't see it mentioned on this seemingly exhaustive list: https://docs.npmjs.com/files/package.json
You will need to build the lerna
repo and then take the build subdirectory and push it as a new git repo that you can then pull with yarn add
lerna
repo in someproject/
someproject/packages/someproject-utils/
git init && git add lib package.json
git remote add origin git@github.com:slbox/only-someproject-utils.git && git push -u origin master
yarn add slbox/only-someproject-utils#master
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.