postcss-normalize-timing-functions
Advanced tools
Comparing version 4.0.0-nightly.2020.1.9 to 4.0.0-nightly.2020.1.11
@@ -8,4 +8,2 @@ "use strict"; | ||
var _postcss = require("postcss"); | ||
var _postcssValueParser = _interopRequireDefault(require("postcss-value-parser")); | ||
@@ -80,21 +78,28 @@ | ||
var _default = (0, _postcss.plugin)('postcss-normalize-timing-functions', () => { | ||
return css => { | ||
const cache = {}; | ||
css.walkDecls(/^(-\w+-)?(animation|transition)(-timing-function)?$/i, decl => { | ||
const value = decl.value; | ||
function pluginCreator() { | ||
return { | ||
postcssPlugin: 'postcss-normalize-timing-functions', | ||
if (cache[value]) { | ||
decl.value = cache[value]; | ||
return; | ||
} | ||
OnceExit(css) { | ||
const cache = {}; | ||
css.walkDecls(/^(-\w+-)?(animation|transition)(-timing-function)?$/i, decl => { | ||
const value = decl.value; | ||
const result = transform(value); | ||
decl.value = result; | ||
cache[value] = result; | ||
}); | ||
if (cache[value]) { | ||
decl.value = cache[value]; | ||
return; | ||
} | ||
const result = transform(value); | ||
decl.value = result; | ||
cache[value] = result; | ||
}); | ||
} | ||
}; | ||
}); | ||
} | ||
pluginCreator.postcss = true; | ||
var _default = pluginCreator; | ||
exports.default = _default; | ||
module.exports = exports.default; |
{ | ||
"name": "postcss-normalize-timing-functions", | ||
"version": "4.0.0-nightly.2020.1.9", | ||
"version": "4.0.0-nightly.2020.1.11", | ||
"description": "Normalize CSS animation/transition timing functions.", | ||
@@ -18,4 +18,3 @@ "main": "dist/index.js", | ||
"cssnano-utils": "nightly", | ||
"postcss": "^7.0.16", | ||
"postcss-value-parser": "^3.3.1" | ||
"postcss-value-parser": "^4.1.0" | ||
}, | ||
@@ -34,3 +33,9 @@ "author": { | ||
"node": ">=10.13.0" | ||
}, | ||
"devDependencies": { | ||
"postcss": "^8.2.1" | ||
}, | ||
"peerDependencies": { | ||
"postcss": "^8.2.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
5687
78
1
+ Addedpostcss-value-parser@4.2.0(transitive)
- Removedpostcss@^7.0.16
- Removedpicocolors@0.2.1(transitive)
- Removedpostcss@7.0.39(transitive)
- Removedpostcss-value-parser@3.3.1(transitive)
- Removedsource-map@0.6.1(transitive)
Updatedpostcss-value-parser@^4.1.0