How do I install Bower packages with Yarn?

Douglas Ludlow picture Douglas Ludlow · Oct 12, 2016 · Viewed 9.7k times · Source

From the project's README:

Multiple Registries: Install any package from either npm or Bower and keep your package workflow the same.

I'm assuming that means that I can install my Bower packages (listed in my project's bower.json) with Yarn. If this is the case, how would I go about doing that?

I'm not seeing any mention of Bower or using separate registries in the documentation. However, I do see the Bower registry listed in the source.

Answer

cs01 picture cs01 · Oct 14, 2016

UPDATE 11/4/16: Yarn decided to remove support for Bower. See the Github pull request and Bower's blog. =(

ORIGINAL: Bower just posted a blog post about this topic. They seem excited about it, but point out that there are currently unresolved issues:

Important note: As it stands right now there still seem to be some issues regarding Bower support. We are however confident that with the help of the community, these issues will be solved quickly as Yarn steps towards 1.0 in upcoming months.

He also refers to a pull request for a bower patch.

When I ran yarn, it deleted my bower_components folder (GitHub ticket here)! I really like yarn though, can't wait for the bower bugs to get resolved.