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

Could you make a similar plugin for CSS URLs? #7

Open
felixfbecker opened this issue Aug 17, 2015 · 2 comments
Open

Could you make a similar plugin for CSS URLs? #7

felixfbecker opened this issue Aug 17, 2015 · 2 comments

Comments

@felixfbecker
Copy link

I'm currently using this in my workflow to get all my JS and CSS files from my HTML and then concat and minify them (it's awesome!). There is a problem however, with CSS like Bootstrap. It uses @font-face and references fonts, when I concat the CSS, the paths are of course broken. There are plugins to rework the paths, but no plugin that actually let's me get the referenced files to copy them over to my build directory. Maybe you could make a similar plugin that parses CSS files and returns all referenced url()s, or point me in the right direction on how to write such a plugin, since I have no idea how to approach this.

@sfarbota
Copy link

sfarbota commented Jan 1, 2016

This issue is a bit old by now, but this plugin already handles CSS files. See the below example, taken from the README.md page:

gulp.task('copy-css', function() {
    gulp.src('./src/*.html')
         .pipe(ghtmlSrc({ presets: 'css'}))
         .pipe(gulp.dest('./build/'));
 });

@voondo
Copy link

voondo commented May 26, 2017

The plugin currently does not parse the css (thus the url() are not processed). But indeed it would be useful.

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

No branches or pull requests

3 participants