Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wiredep for Images #181

Open
CWSpear opened this issue Apr 21, 2015 · 2 comments
Open

Wiredep for Images #181

CWSpear opened this issue Apr 21, 2015 · 2 comments

Comments

@CWSpear
Copy link
Contributor

CWSpear commented Apr 21, 2015

How would you feel about adding support for images?

It doesn't make sense in all use-cases, but it does for the wiredep().png use-case.

For example, if I install select2, which has 2 pngs and a gif listed under the main, then if I have this in my gulp file:

var wiredepDeps = $.wiredep();
gulp.src(_.flatten(wiredepDeps.png, wiredepDeps.gif, wiredepDeps.jpg, wiredepDeps.jpeg, wiredepDeps.svg))
    .pipe(gulp.dest(dest + 'css/'));

then it moves all those images to the css/ folder in dest, and since that's where I'm moving any bower'd css, it would work great.

I say "would work," because wiredep currently skips over images.

There are a couple different ways we could approach actually implementing this, but just to get what I'm talking about working, the bare minimum you could do is change this line to this:

('detectable-file-types', ['png', 'gif', 'jpg', 'jpeg', 'svg'])

Then it works as I described.

Thoughts?

@stephenplusplus
Copy link
Member

Sorry man. It sounds good to me. 👍

@CWSpear
Copy link
Contributor Author

CWSpear commented May 22, 2015

Aight, I'll put it in my queue. It is a little awkward cuz it's not something that is really "injected," but helps in the extracting part.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants