File tree Expand file tree Collapse file tree 3 files changed +9
-7
lines changed
Expand file tree Collapse file tree 3 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,9 @@ module.exports = function gulpCleanCSS(options, callback) {
2626 if ( file . sourceMap )
2727 options . sourceMap = JSON . parse ( JSON . stringify ( file . sourceMap ) ) ;
2828
29+ if ( ! options . rebaseTo )
30+ options . rebase = false ;
31+
2932 let style = {
3033 [ file . path ] : {
3134 styles : file . contents ? file . contents . toString ( ) : ''
Original file line number Diff line number Diff line change 22 "name" : " gulp-clean-css" ,
33 "description" : " Minify css with clean-css." ,
44 "homepage" : " https://github.com/scniro/gulp-clean-css#readme" ,
5- "version" : " 3.3.0 " ,
5+ "version" : " 3.3.1 " ,
66 "author" : " scniro" ,
77 "license" : " MIT" ,
88 "bugs" : {
Original file line number Diff line number Diff line change @@ -265,18 +265,17 @@ describe('gulp-clean-css: base functionality', function () {
265265} ) ;
266266
267267describe ( 'gulp-clean-css: rebase' , function ( ) {
268-
269- it ( 'should not rebase files by default' , function ( done ) {
268+ it ( 'should not rebase files by default - do not resolve relative files' , function ( done ) {
270269
271270 gulp . src ( [ 'test/fixtures/rebasing/subdir/insub.css' ] )
272271 . pipe ( cleanCSS ( ) )
273272 . on ( 'data' , function ( file ) {
274273
275274 let expected = `
276- p.insub_same{background:url(test/fixtures/rebasing/subdir/ insub.png)}
277- p.insub_child{background:url(test/fixtures/rebasing/subdir/ child/child.png)}
278- p.insub_parent{background:url(test/fixtures/rebasing /parent.png)}
279- p.insub_other{background:url(test/fixtures/rebasing /othersub/inother.png)}
275+ p.insub_same{background:url(insub.png)}
276+ p.insub_child{background:url(child/child.png)}
277+ p.insub_parent{background:url(.. /parent.png)}
278+ p.insub_other{background:url(.. /othersub/inother.png)}
280279 p.insub_absolute{background:url(/inroot.png)}` ;
281280
282281 let actual = file . contents . toString ( ) ;
You can’t perform that action at this time.
0 commit comments