cssnano-paras20xx
Advanced tools
Comparing version 3.6.2-patch1 to 3.7.3-patch1
@@ -0,1 +1,24 @@ | ||
# 3.7.3 | ||
* Unpins postcss-filter-plugins from `2.0.0` as a fix has landed in the new | ||
version of uniqid. | ||
# 3.7.2 | ||
* Temporarily pins postcss-filter-plugins to version `2.0.0` in order to | ||
mitigate an issue with uniqid `3.0.0`. | ||
# 3.7.1 | ||
* Enabling safe mode now turns off both postcss-merge-idents & | ||
postcss-normalize-url's `stripWWW` option. | ||
# 3.7.0 | ||
* Added: Reduce `background-repeat` definitions; works with both this property | ||
& the `background` shorthand, and aims to compress the extended two value | ||
syntax into the single value syntax. | ||
* Added: Reduce `initial` values for properties when the *actual* initial value | ||
is shorter; for example, `min-width: initial` becomes `min-width: 0`. | ||
# 3.6.2 | ||
@@ -2,0 +25,0 @@ |
@@ -21,6 +21,2 @@ 'use strict'; | ||
var _warnOnce = require('./lib/warnOnce'); | ||
var _warnOnce2 = _interopRequireDefault(_warnOnce); | ||
var _postcssFilterPlugins2 = require('postcss-filter-plugins'); | ||
@@ -34,2 +30,6 @@ | ||
var _postcssReduceInitial = require('postcss-reduce-initial'); | ||
var _postcssReduceInitial2 = _interopRequireDefault(_postcssReduceInitial); | ||
var _postcssMinifyGradients = require('postcss-minify-gradients'); | ||
@@ -95,22 +95,2 @@ | ||
var _functionOptimiser = require('./lib/functionOptimiser'); | ||
var _functionOptimiser2 = _interopRequireDefault(_functionOptimiser); | ||
var _filterOptimiser = require('./lib/filterOptimiser'); | ||
var _filterOptimiser2 = _interopRequireDefault(_filterOptimiser); | ||
var _reducePositions = require('./lib/reducePositions'); | ||
var _reducePositions2 = _interopRequireDefault(_reducePositions); | ||
var _core = require('./lib/core'); | ||
var _core2 = _interopRequireDefault(_core); | ||
var _reduceTimingFunctions = require('./lib/reduceTimingFunctions'); | ||
var _reduceTimingFunctions2 = _interopRequireDefault(_reduceTimingFunctions); | ||
var _postcssMergeIdents = require('postcss-merge-idents'); | ||
@@ -148,2 +128,26 @@ | ||
var _functionOptimiser = require('./lib/functionOptimiser'); | ||
var _functionOptimiser2 = _interopRequireDefault(_functionOptimiser); | ||
var _filterOptimiser = require('./lib/filterOptimiser'); | ||
var _filterOptimiser2 = _interopRequireDefault(_filterOptimiser); | ||
var _reduceBackgroundRepeat = require('./lib/reduceBackgroundRepeat'); | ||
var _reduceBackgroundRepeat2 = _interopRequireDefault(_reduceBackgroundRepeat); | ||
var _reducePositions = require('./lib/reducePositions'); | ||
var _reducePositions2 = _interopRequireDefault(_reducePositions); | ||
var _core = require('./lib/core'); | ||
var _core2 = _interopRequireDefault(_core); | ||
var _reduceTimingFunctions = require('./lib/reduceTimingFunctions'); | ||
var _reduceTimingFunctions2 = _interopRequireDefault(_reduceTimingFunctions); | ||
var _styleCache = require('./lib/styleCache'); | ||
@@ -153,4 +157,11 @@ | ||
var _warnOnce = require('./lib/warnOnce'); | ||
var _warnOnce2 = _interopRequireDefault(_warnOnce); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
// Processors | ||
var processors = { | ||
@@ -162,2 +173,3 @@ postcssFilterPlugins: function postcssFilterPlugins() { | ||
postcssMinifyGradients: _postcssMinifyGradients2.default, | ||
postcssReduceInitial: _postcssReduceInitial2.default, | ||
postcssSvgo: _postcssSvgo2.default, | ||
@@ -182,2 +194,3 @@ postcssReduceTransforms: _postcssReduceTransforms2.default, | ||
filterOptimiser: _filterOptimiser2.default, | ||
reduceBackgroundRepeat: _reduceBackgroundRepeat2.default, | ||
reducePositions: _reducePositions2.default, | ||
@@ -197,5 +210,6 @@ core: _core2.default, | ||
// Processors | ||
/** | ||
* Deprecation warnings | ||
*/ | ||
var defaultOptions = { | ||
@@ -220,2 +234,5 @@ autoprefixer: { | ||
}, | ||
postcssMergeIdents: { | ||
disable: true | ||
}, | ||
postcssReduceIdents: { | ||
@@ -225,2 +242,5 @@ counterStyle: false, | ||
}, | ||
postcssNormalizeUrl: { | ||
stripWWW: false | ||
}, | ||
postcssZindex: { | ||
@@ -227,0 +247,0 @@ disable: true |
@@ -43,5 +43,5 @@ 'use strict'; | ||
return function (css) { | ||
css.walkDecls(transformDecls); | ||
return css.walkDecls(transformDecls); | ||
}; | ||
}); | ||
module.exports = exports['default']; |
@@ -13,2 +13,6 @@ 'use strict'; | ||
var _getArguments = require('./getArguments'); | ||
var _getArguments2 = _interopRequireDefault(_getArguments); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -34,19 +38,8 @@ | ||
function getArguments(node) { | ||
return node.nodes.reduce(function (list, child) { | ||
if (child.type !== 'div') { | ||
list[list.length - 1].push(child); | ||
} else { | ||
list.push([]); | ||
} | ||
return list; | ||
}, [[]]); | ||
} | ||
function transform(decl) { | ||
if (! ~properties.indexOf(decl.prop)) { | ||
if (!~properties.indexOf(decl.prop)) { | ||
return; | ||
} | ||
var values = (0, _postcssValueParser2.default)(decl.value); | ||
var args = getArguments(values); | ||
var args = (0, _getArguments2.default)(values); | ||
var relevant = []; | ||
@@ -53,0 +46,0 @@ args.forEach(function (arg) { |
@@ -11,2 +11,6 @@ 'use strict'; | ||
var _getMatch = require('./getMatch'); | ||
var _getMatch2 = _interopRequireDefault(_getMatch); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -22,11 +26,4 @@ | ||
}; | ||
var getMatch = (0, _getMatch2.default)(keywords); | ||
function getMatch(args) { | ||
return args.reduce(function (list, arg, i) { | ||
return list.filter(function (keyword) { | ||
return keyword[1][i] === arg; | ||
}); | ||
}, keywords); | ||
} | ||
function reduce(node) { | ||
@@ -33,0 +30,0 @@ if (node.type !== 'function') { |
{ | ||
"name": "cssnano-paras20xx", | ||
"version": "3.6.2-patch1", | ||
"version": "3.7.3-patch1", | ||
"description": "A modular minifier, built on top of the PostCSS ecosystem.", | ||
"main": "dist/index.js", | ||
"scripts": { | ||
"bundle-size": "webpack --json --config src/__tests__/_webpack.config.js | webpack-bundle-size-analyzer", | ||
"docs": "cd docs && npm run build && cd .. && gh-pages -d docs/dist", | ||
"pretest": "eslint src", | ||
"pretest": "eslint --ignore-path .gitignore src", | ||
"prepublish": "del-cli dist && cross-env BABEL_ENV=publish babel src --out-dir dist --ignore /__tests__/", | ||
"report": "nyc report --reporter=html", | ||
"test": "nyc ava src/__tests__/*.js" | ||
"test": "nyc ava src/__tests__/*.js", | ||
"test-012": "nyc ava src/__tests__/*.js" | ||
}, | ||
@@ -50,2 +52,3 @@ "keywords": [ | ||
"postcss-reduce-idents": "^2.2.2", | ||
"postcss-reduce-initial": "^1.0.0", | ||
"postcss-reduce-transforms": "^1.0.3", | ||
@@ -58,5 +61,6 @@ "postcss-svgo": "^2.1.1", | ||
"devDependencies": { | ||
"ava": "^0.14.0", | ||
"ava": "^0.15.0", | ||
"babel-cli": "^6.5.1", | ||
"babel-core": "^6.5.1", | ||
"babel-loader": "^6.2.4", | ||
"babel-plugin-add-module-exports": "^0.2.0", | ||
@@ -70,4 +74,6 @@ "babel-preset-es2015-loose": "^7.0.0", | ||
"del-cli": "^0.2.0", | ||
"eslint": "^2.0.0", | ||
"eslint-config-cssnano": "^2.0.0", | ||
"eslint": "^3.0.0", | ||
"eslint-config-cssnano": "^3.0.0", | ||
"eslint-plugin-babel": "^3.3.0", | ||
"eslint-plugin-import": "^1.10.2", | ||
"gh-pages": "^0.11.0", | ||
@@ -77,4 +83,5 @@ "hook-std": "^0.2.0", | ||
"ncp": "^2.0.0", | ||
"nyc": "^6.0.0", | ||
"webpack": "^1.12.13" | ||
"nyc": "^7.0.0", | ||
"webpack": "^1.12.13", | ||
"webpack-bundle-size-analyzer": "^2.0.2" | ||
}, | ||
@@ -81,0 +88,0 @@ "homepage": "https://github.com/ben-eb/cssnano", |
@@ -34,4 +34,3 @@ <h1 align="center"> | ||
Pull requests are welcome. If you add functionality, then please add unit tests | ||
to cover it. | ||
See [CONTRIBUTING.md](CONTRIBUTING.md). | ||
@@ -38,0 +37,0 @@ |
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
39937
15
554
32
23
55
+ Addedpostcss-reduce-initial@1.0.1(transitive)