1.0.1 • Published 7 years ago

gulp-cdn-url-append v1.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

Gulp CDN url append

Find and replace all url paths on your CSS with CDN. Also append a unique token at the end of the path. This will help you to invalidate your file on every change.

Installation

Install via npm:

npm install gulp-cdn-url-append --save-dev

Example

const gulp = require('gulp');
const cdnAppend  = require('gulp-cdn-url-append');
const cdnUrl = 'http://my.cdn.com';

gulp.task('default', function() {
    return gulp.src('./style.css')
        .pipe(cdnAppend(cdnUrl));
});

Result: background-image: url('http://my.cdn.com/images/logo.png?cid=fkelfekflekflefke')

Contributing

Pull requests are welcome. If you add functionality, then please add unit tests to cover it.

License

MIT © Thanos Korakas