bower-away icon indicating copy to clipboard operation
bower-away copied to clipboard

How can I add to new bower component now with yarn.

Open srikanthdarmapuri opened this issue 8 years ago • 5 comments

I would like to add new bower component inside node_modules/@bower_components. How can achieve that. If do "yarn add <package_name>", it is added directly in node_modules/

srikanthdarmapuri avatar Nov 23 '17 15:11 srikanthdarmapuri

I have the same problem any help, please!

ahbarrios avatar Dec 07 '17 23:12 ahbarrios

Shouldn't you use yarn add --flat <package_name> then ?

Stefdv avatar Jan 16 '18 17:01 Stefdv

e.g. if you want to add jquery then do:

bower lookup jquery
jquery https://github.com/jquery/jquery-dist.git

and:

yarn add @bower_components/jquery@jquery/jquery-dist

But really, you should consider adding new components from npm's registry (i.e. yarn add jquery), and employing webpack to bundle them (const $ = require('jquery')).

--flat is not necessary

sheerun avatar Jan 17 '18 00:01 sheerun

I'm using Polymer...Until Polymer 3 is released i'm stuck on bower :( And creating a fork of all components seems a little overhead

Stefdv avatar Jan 17 '18 16:01 Stefdv

You don't need to fork anything. Yarn can install any github repository.

sheerun avatar Jan 17 '18 16:01 sheerun