Package Exports
- gulp-cssretarget
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (gulp-cssretarget) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
gulp-cssretarget
Retarget relative CSS URLs during asset rebasing.
Install
npm install gulp-cssretarget --save
Example usage
var cssRetarget = require('gulp-cssretarget');
var useref = require('gulp-useref');
var concat = require('gulp-concat');
var gulpif = require('gulp-if');
...
var userefAssets = useref.assets({
noconcat: true // preserve paths for gulp-cssretarget
});
// retargets relative URLs when moving from www to dist
return gulp.src('www/index.html')
.pipe(userefAssets)
.pipe(gulpif('**/*.css', cssRetarget({ root: 'www' })))
.pipe(gulpif('**/*.css', concat('style.css')))
.pipe(gulpif('**/*.js', concat('style.js')))
.pipe(userefAssets.restore())
.pipe(gulp.dest('dist'));
Options
options.root
Type: String
Default value: ''
The directory relative to which paths are determined.
options.prepend
Type: String
Default value: ''
String prepended to each asset URL.
Release History
1.1.2 - 1.1.1
Update docs, refresh package
1.1.0
Add prepend option
1.0.0
Initial release