postcss-merge-longhand
Advanced tools
Comparing version 1.0.2 to 2.0.0
@@ -0,1 +1,5 @@ | ||
# 2.0.0 | ||
* Upgraded to PostCSS 5. | ||
# 1.0.2 | ||
@@ -2,0 +6,0 @@ |
@@ -50,2 +50,6 @@ 'use strict'; | ||
var remove = function remove(node) { | ||
return node.remove(); | ||
}; | ||
var mergeLonghand = function mergeLonghand(rule, prop) { | ||
@@ -58,5 +62,3 @@ var properties = trblMap(prop); | ||
if (_libCanMerge2['default'].apply(undefined, rules)) { | ||
rules.slice(0, 3).forEach(function (rule) { | ||
return rule.removeSelf(); | ||
}); | ||
rules.slice(0, 3).forEach(remove); | ||
rules[3].value = (0, _libMinifyTrbl2['default'])(_libMergeValues2['default'].apply(undefined, rules)); | ||
@@ -70,3 +72,3 @@ rules[3].prop = prop; | ||
return function (css) { | ||
css.eachRule(function (rule) { | ||
css.walkRules(function (rule) { | ||
rule.nodes.filter(function (node) { | ||
@@ -83,5 +85,3 @@ return node.prop && ~trblProps.indexOf(node.prop); | ||
if (_libCanMerge2['default'].apply(undefined, rules) && _libNumValues2['default'].apply(undefined, rules) === 3) { | ||
rules.slice(0, 2).forEach(function (rule) { | ||
return rule.removeSelf(); | ||
}); | ||
rules.slice(0, 2).forEach(remove); | ||
rules[2].prop = 'border'; | ||
@@ -95,5 +95,3 @@ rules[2].value = _libMergeValues2['default'].apply(undefined, rules); | ||
if (_libCanMerge2['default'].apply(undefined, rules) && _libIdentical2['default'].apply(undefined, rules)) { | ||
rules.slice(0, 3).forEach(function (rule) { | ||
return rule.removeSelf(); | ||
}); | ||
rules.slice(0, 3).forEach(remove); | ||
rules[3].prop = 'border'; | ||
@@ -100,0 +98,0 @@ } |
{ | ||
"name": "postcss-merge-longhand", | ||
"version": "1.0.2", | ||
"version": "2.0.0", | ||
"description": "Merge longhand properties into shorthand with PostCSS.", | ||
@@ -23,5 +23,5 @@ "main": "dist/index.js", | ||
"devDependencies": { | ||
"babel": "^5.8.21", | ||
"babel": "^5.8.23", | ||
"babel-tape-runner": "^1.2.0", | ||
"tap-spec": "^4.0.2", | ||
"tap-spec": "^4.1.0", | ||
"tape": "^4.2.0" | ||
@@ -37,4 +37,4 @@ }, | ||
"dependencies": { | ||
"postcss": "^4.1.16" | ||
"postcss": "^5.0.4" | ||
} | ||
} |
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
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
29423
25
629
1
+ 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