diff options
author | Florian Dold <florian.dold@gmail.com> | 2017-05-24 15:10:37 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2017-05-24 15:11:17 +0200 |
commit | 7a3df06eb573d36142bd1a8e03c5ce8752d300b3 (patch) | |
tree | 70bfaea8884c374876f607774850a3a51c0cb381 /node_modules/clean-css/lib/options/optimization-level.js | |
parent | aca1143cb9eed16cf37f04e475e4257418dd18ac (diff) |
fix build issues and add typedoc
Diffstat (limited to 'node_modules/clean-css/lib/options/optimization-level.js')
-rw-r--r-- | node_modules/clean-css/lib/options/optimization-level.js | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/node_modules/clean-css/lib/options/optimization-level.js b/node_modules/clean-css/lib/options/optimization-level.js index d9828287b..0d3ad7303 100644 --- a/node_modules/clean-css/lib/options/optimization-level.js +++ b/node_modules/clean-css/lib/options/optimization-level.js @@ -17,9 +17,9 @@ DEFAULTS[OptimizationLevel.One] = { optimizeBackground: true, optimizeBorderRadius: true, optimizeFilter: true, - optimizeFont: true, optimizeFontWeight: true, optimizeOutline: true, + removeEmpty: true, removeNegativePaddings: true, removeQuotes: true, removeWhitespace: true, @@ -41,11 +41,14 @@ DEFAULTS[OptimizationLevel.Two] = { mergeNonAdjacentRules: true, mergeSemantically: false, overrideProperties: true, + removeEmpty: true, reduceNonAdjacentRules: true, removeDuplicateFontRules: true, removeDuplicateMediaBlocks: true, removeDuplicateRules: true, - restructureRules: false + removeUnusedAtRules: false, + restructureRules: false, + skipProperties: [] }; var ALL_KEYWORD_1 = '*'; @@ -55,6 +58,7 @@ var FALSE_KEYWORD_2 = 'off'; var TRUE_KEYWORD_1 = 'true'; var TRUE_KEYWORD_2 = 'on'; +var LIST_VALUE_SEPARATOR = ','; var OPTION_SEPARATOR = ';'; var OPTION_VALUE_SEPARATOR = ':'; @@ -99,6 +103,10 @@ function optimizationLevelFrom(source) { source[One].roundingPrecision = roundingPrecisionFrom(source[One].roundingPrecision); } + if (Two in source && 'skipProperties' in source[Two] && typeof(source[Two].skipProperties) == 'string') { + source[Two].skipProperties = source[Two].skipProperties.split(LIST_VALUE_SEPARATOR); + } + if (Zero in source || One in source || Two in source) { level[Zero] = override(level[Zero], source[Zero]); } |