taptapship / wiredep

Wire Bower dependencies to your source code.
MIT License
1.15k stars 142 forks source link

Feature Request: Allow JS / CSS injection outside of Bower packages #161

Closed ip2k closed 9 years ago

ip2k commented 9 years ago

My use-case here is that I'm using grunt-wiredep ( https://github.com/stephenplusplus/grunt-wiredep ) to manage all my JS /CSS dependencies, but the bootswatch package would require that I manually insert script tags in my HTML to specify the theme I want to use.

I think it'd be great to have something like an include directive for the config, so you could do e.g.:

include: ['bower_components/bootswatch/yeti/bootstrap.css' ],
exclude: ['bower_components/bootstrap/dist/css/bootstrap.css']

to have the Bootswatch theme (which provides a bootstrap.css) take the place of the normal Bootstrap bootstrap.css.

It's also very possible that there's already an easier way to do this, so if you know, please let me know!

Thanks!

stephenplusplus commented 9 years ago

I think the easiest way to do this is just manually inserting the script in your document. If that for some reason doesn't work, you can also use overrides to list the files already in bootswatch's bower.json's main property, in addition to the file you need.

Hope that helps!