gulp-clean-css
Advanced tools
Comparing version 3.0.4 to 3.1.0
16
index.js
@@ -14,3 +14,3 @@ const applySourceMap = require('vinyl-sourcemaps-apply'); | ||
var transform = function (file, enc, cb) { | ||
let transform = function (file, enc, cb) { | ||
@@ -28,4 +28,10 @@ if (!file || !file.contents) | ||
var style = file.contents ? file.contents.toString() : ''; | ||
if (options.rebaseTo) { | ||
let relative = path.resolve(file.path, options.rebaseTo); | ||
options.rebaseTo = path.relative(relative, file.path) | ||
} | ||
let style = file.contents ? file.contents.toString() : ''; | ||
new CleanCSS(options).minify(style, function (errors, css) { | ||
@@ -37,3 +43,3 @@ | ||
if (typeof callback === 'function') { | ||
var details = { | ||
let details = { | ||
'stats': css.stats, | ||
@@ -44,3 +50,3 @@ 'errors': css.errors, | ||
'name': file.path.split(file.base)[1] | ||
} | ||
}; | ||
@@ -57,3 +63,3 @@ if (css.sourceMap) | ||
var map = JSON.parse(css.sourceMap); | ||
let map = JSON.parse(css.sourceMap); | ||
map.file = path.relative(file.base, file.path); | ||
@@ -60,0 +66,0 @@ map.sources = map.sources.map(function (src) { |
@@ -5,3 +5,3 @@ { | ||
"homepage": "https://github.com/scniro/gulp-clean-css#readme", | ||
"version": "3.0.4", | ||
"version": "3.1.0", | ||
"author": "scniro", | ||
@@ -33,24 +33,24 @@ "license": "MIT", | ||
"dependencies": { | ||
"clean-css": "^4.0.9", | ||
"gulp-util": "^3.0.8", | ||
"through2": "^2.0.3", | ||
"vinyl-sourcemaps-apply": "^0.2.1" | ||
"clean-css": "4.1.0", | ||
"gulp-util": "3.0.8", | ||
"through2": "2.0.3", | ||
"vinyl-sourcemaps-apply": "0.2.1" | ||
}, | ||
"devDependencies": { | ||
"chai": "^3.5.0", | ||
"chai-string": "^1.3.0", | ||
"coveralls": "^2.12.0", | ||
"del": "^2.2.2", | ||
"express": "^4.15.2", | ||
"gulp": "^3.9.1", | ||
"gulp-concat": "^2.6.1", | ||
"gulp-istanbul": "^1.1.1", | ||
"gulp-mocha": "^4.0.1", | ||
"gulp-rename": "^1.2.2", | ||
"gulp-sass": "^3.1.0", | ||
"gulp-sourcemaps": "^2.4.1", | ||
"mocha": "^3.2.0", | ||
"vinyl": "^2.0.1", | ||
"vinyl-buffer": "^1.0.0", | ||
"vinyl-fs-fake": "^1.1.0" | ||
"chai": "3.5.0", | ||
"chai-string": "1.3.0", | ||
"coveralls": "2.13.1", | ||
"del": "2.2.2", | ||
"express": "4.15.2", | ||
"gulp": "3.9.1", | ||
"gulp-concat": "2.6.1", | ||
"gulp-istanbul": "1.1.1", | ||
"gulp-mocha": "4.3.1", | ||
"gulp-rename": "1.2.2", | ||
"gulp-sass": "3.1.0", | ||
"gulp-sourcemaps": "2.6.0", | ||
"mocha": "3.3.0", | ||
"vinyl": "2.0.2", | ||
"vinyl-buffer": "1.0.0", | ||
"vinyl-fs-fake": "1.1.0" | ||
}, | ||
@@ -57,0 +57,0 @@ "scripts": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7705
51
+ Addedclean-css@4.1.0(transitive)
+ Addedthrough2@2.0.3(transitive)
- Removedclean-css@4.2.4(transitive)
- Removedsource-map@0.6.1(transitive)
- Removedthrough2@2.0.5(transitive)
Updatedclean-css@4.1.0
Updatedgulp-util@3.0.8
Updatedthrough2@2.0.3
Updatedvinyl-sourcemaps-apply@0.2.1