postcss-reduce-idents
Advanced tools
Comparing version 1.0.3 to 2.0.0
@@ -0,1 +1,5 @@ | ||
# 2.0.0 | ||
* Upgraded to PostCSS 5. | ||
# 1.0.3 | ||
@@ -2,0 +6,0 @@ |
10
index.js
@@ -18,3 +18,3 @@ 'use strict'; | ||
// Encode at rule names and cache the result | ||
css.eachAtRule(atRuleRegex, function (rule) { | ||
css.walkAtRules(atRuleRegex, function (rule) { | ||
if (!cache[rule.params]) { | ||
@@ -30,3 +30,3 @@ cache[rule.params] = { | ||
// Iterate each property and change their names | ||
css.eachDecl(propRegex, function (decl) { | ||
css.walkDecls(propRegex, function (decl) { | ||
decl.value = eachValue(decl.value, function (value) { | ||
@@ -55,3 +55,3 @@ if (value in cache) { | ||
var declCache = []; | ||
css.eachDecl(/counter-(reset|increment)/, function (decl) { | ||
css.walkDecls(/counter-(reset|increment)/, function (decl) { | ||
decl.value = eachValue(decl.value, function (value) { | ||
@@ -71,3 +71,3 @@ if (!/^-?\d*$/.test(value)) { | ||
}); | ||
css.eachDecl('content', function (decl) { | ||
css.walkDecls('content', function (decl) { | ||
decl.value = eachValue(decl.value, function (value) { | ||
@@ -81,3 +81,3 @@ return reduce(value, /(counters?)\(/, function (body, fn) { | ||
return counter; | ||
}).join(','); | ||
}).join(); | ||
return fn + '(' + counters + ')'; | ||
@@ -84,0 +84,0 @@ }); |
{ | ||
"name": "postcss-reduce-idents", | ||
"version": "1.0.3", | ||
"version": "2.0.0", | ||
"description": "Reduce custom identifiers with PostCSS.", | ||
@@ -16,4 +16,4 @@ "main": "index.js", | ||
"devDependencies": { | ||
"tap-spec": "^2.2.2", | ||
"tape": "^3.5.0" | ||
"tap-spec": "^4.1.0", | ||
"tape": "^4.2.0" | ||
}, | ||
@@ -28,5 +28,5 @@ "homepage": "https://github.com/ben-eb/postcss-reduce-idents", | ||
"dependencies": { | ||
"postcss": "^4.1.2", | ||
"postcss": "^5.0.4", | ||
"reduce-function-call": "^1.0.1" | ||
} | ||
} |
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
8453
+ Addedansi-regex@2.1.1(transitive)
+ Addedansi-styles@2.2.1(transitive)
+ Addedchalk@1.1.3(transitive)
+ Addedescape-string-regexp@1.0.5(transitive)
+ Addedhas-ansi@2.0.0(transitive)
+ Addedhas-flag@1.0.0(transitive)
+ Addedjs-base64@2.6.4(transitive)
+ Addedpostcss@5.2.18(transitive)
+ Addedsource-map@0.5.7(transitive)
+ Addedstrip-ansi@3.0.1(transitive)
+ Addedsupports-color@2.0.03.2.3(transitive)
- Removedamdefine@1.0.1(transitive)
- Removedes6-promise@2.3.0(transitive)
- Removedjs-base64@2.1.9(transitive)
- Removedpostcss@4.1.16(transitive)
- Removedsource-map@0.4.4(transitive)
Updatedpostcss@^5.0.4