A
A
Artyom Innokentiev2016-03-08 22:26:09
Node.js
Artyom Innokentiev, 2016-03-08 22:26:09

How to rewrite relative paths of fonts and images in css files (Gulp.js)?

When building a css project - dependency files from bower_components refer to their images and fonts in relative path - how to rewrite paths to their absolute ones?
For example, at the input a file with the content:

.info{
    background: url(themes/assets/hello.png)
}

At the exit:
.info{
    background: url(/static/img/hello.png)
}

Also, I would like the URLs that refer to CDN resources not to change.
How to do it?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question