postcss-minify-selectors
Advanced tools
Comparing version 2.0.4 to 2.0.5
@@ -0,1 +1,5 @@ | ||
# 2.0.5 | ||
* Updated postcss-selector-parser to `2.0.0`. | ||
# 2.0.4 | ||
@@ -2,0 +6,0 @@ |
'use strict'; | ||
exports.__esModule = true; | ||
var _postcss = require('postcss'); | ||
@@ -41,3 +43,3 @@ | ||
var uniqueSelectors = []; | ||
selectors.eachInside(function (sel) { | ||
selectors.walk(function (sel) { | ||
var toString = String(sel); | ||
@@ -67,3 +69,3 @@ // Trim whitespace around the value | ||
var uniques = []; | ||
sel.eachInside(function (child) { | ||
sel.walk(function (child) { | ||
if (child.type === 'selector') { | ||
@@ -74,3 +76,3 @@ var childStr = String(child); | ||
} else { | ||
child.removeSelf(); | ||
child.remove(); | ||
} | ||
@@ -88,3 +90,3 @@ } | ||
} else { | ||
sel.removeSelf(); | ||
sel.remove(); | ||
} | ||
@@ -102,3 +104,3 @@ } | ||
if (next && next.type !== 'combinator') { | ||
sel.removeSelf(); | ||
sel.remove(); | ||
} | ||
@@ -110,6 +112,7 @@ } | ||
module.exports = _postcss2.default.plugin('postcss-minify-selectors', function () { | ||
exports.default = _postcss2.default.plugin('postcss-minify-selectors', function () { | ||
return function (css) { | ||
return css.walkRules(optimise); | ||
}; | ||
}); | ||
}); | ||
module.exports = exports['default']; |
{ | ||
"name": "postcss-minify-selectors", | ||
"version": "2.0.4", | ||
"version": "2.0.5", | ||
"description": "Minify selectors with PostCSS.", | ||
@@ -25,3 +25,3 @@ "main": "dist/index.js", | ||
"devDependencies": { | ||
"ava": "^0.11.0", | ||
"ava": "^0.14.0", | ||
"babel-cli": "^6.5.1", | ||
@@ -34,4 +34,4 @@ "babel-core": "^6.5.1", | ||
"del-cli": "^0.2.0", | ||
"eslint": "^1.10.3", | ||
"eslint-config-cssnano": "^1.0.0", | ||
"eslint": "^2.0.0", | ||
"eslint-config-cssnano": "^2.0.0", | ||
"postcss-font-magician": "^1.4.0" | ||
@@ -49,3 +49,3 @@ }, | ||
"postcss": "^5.0.14", | ||
"postcss-selector-parser": "^1.3.1" | ||
"postcss-selector-parser": "^2.0.0" | ||
}, | ||
@@ -52,0 +52,0 @@ "eslintConfig": { |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
10401
124
0
+ Addedpostcss-selector-parser@2.2.3(transitive)
- Removedpostcss-selector-parser@1.3.3(transitive)