'How can I install a subfolder of a github repository using yarn?

I'm trying to add a library as a dependency to a project.

This library is setup in a fairly peculiar way, with this file structure

package.json
library/
    package.json

in /package.json the name is just parent-folder, while in /library/package.json the name is library-name.

On npm it's also published as library-name.

What I'm trying to do is creating my own fork and installing this library using yarn without release a npm package.

Is this possible? How can you achieve this?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source