🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

cssnano-preset-default

Package Overview
Dependencies
Maintainers
7
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cssnano-preset-default - npm Package Compare versions

Comparing version

to
5.2.0

types/index.d.ts

63

package.json
{
"name": "cssnano-preset-default",
"version": "5.1.12",
"version": "5.2.0",
"main": "src/index.js",
"types": "types/index.d.ts",
"description": "Safe defaults for cssnano which require minimal configuration.",
"files": [
"LICENSE-MIT",
"src"
"src",
"types"
],

@@ -13,30 +15,30 @@ "license": "MIT",

"css-declaration-sorter": "^6.0.3",
"cssnano-utils": "^3.0.2",
"postcss-calc": "^8.2.0",
"postcss-colormin": "^5.2.5",
"postcss-convert-values": "^5.0.4",
"postcss-discard-comments": "^5.0.3",
"postcss-discard-duplicates": "^5.0.3",
"postcss-discard-empty": "^5.0.3",
"postcss-discard-overridden": "^5.0.4",
"postcss-merge-longhand": "^5.0.6",
"postcss-merge-rules": "^5.0.6",
"postcss-minify-font-values": "^5.0.4",
"postcss-minify-gradients": "^5.0.6",
"postcss-minify-params": "^5.0.5",
"postcss-minify-selectors": "^5.1.3",
"postcss-normalize-charset": "^5.0.3",
"postcss-normalize-display-values": "^5.0.3",
"postcss-normalize-positions": "^5.0.4",
"postcss-normalize-repeat-style": "^5.0.4",
"postcss-normalize-string": "^5.0.4",
"postcss-normalize-timing-functions": "^5.0.3",
"postcss-normalize-unicode": "^5.0.4",
"postcss-normalize-url": "^5.0.5",
"postcss-normalize-whitespace": "^5.0.4",
"postcss-ordered-values": "^5.0.5",
"postcss-reduce-initial": "^5.0.3",
"postcss-reduce-transforms": "^5.0.4",
"postcss-svgo": "^5.0.4",
"postcss-unique-selectors": "^5.0.4"
"cssnano-utils": "^3.1.0",
"postcss-calc": "^8.2.3",
"postcss-colormin": "^5.3.0",
"postcss-convert-values": "^5.1.0",
"postcss-discard-comments": "^5.1.0",
"postcss-discard-duplicates": "^5.1.0",
"postcss-discard-empty": "^5.1.0",
"postcss-discard-overridden": "^5.1.0",
"postcss-merge-longhand": "^5.1.0",
"postcss-merge-rules": "^5.1.0",
"postcss-minify-font-values": "^5.1.0",
"postcss-minify-gradients": "^5.1.0",
"postcss-minify-params": "^5.1.0",
"postcss-minify-selectors": "^5.2.0",
"postcss-normalize-charset": "^5.1.0",
"postcss-normalize-display-values": "^5.1.0",
"postcss-normalize-positions": "^5.1.0",
"postcss-normalize-repeat-style": "^5.1.0",
"postcss-normalize-string": "^5.1.0",
"postcss-normalize-timing-functions": "^5.1.0",
"postcss-normalize-unicode": "^5.1.0",
"postcss-normalize-url": "^5.1.0",
"postcss-normalize-whitespace": "^5.1.0",
"postcss-ordered-values": "^5.1.0",
"postcss-reduce-initial": "^5.1.0",
"postcss-reduce-transforms": "^5.1.0",
"postcss-svgo": "^5.1.0",
"postcss-unique-selectors": "^5.1.0"
},

@@ -57,2 +59,3 @@ "author": {

"devDependencies": {
"@types/css-declaration-sorter": "^6.0.1",
"postcss": "^8.2.15"

@@ -59,0 +62,0 @@ },

@@ -46,2 +46,32 @@ 'use strict';

/** @typedef {{
discardComments?: false | import('postcss-discard-comments').Options & { exclude?: true},
reduceInitial?: false | { exclude?: true}
minifyGradients?: false | { exclude?: true}
svgo?: false | import('postcss-svgo').Options & { exclude?: true},
reduceTransforms?: false | { exclude?: true}
convertValues?: false | import('postcss-convert-values').Options & { exclude?: true},
calc?: false | import('postcss-calc').PostCssCalcOptions & { exclude?: true},
colormin?: false | Record<string, any> & { exclude?: true},
orderedValues?: false | { exclude?: true},
minifySelectors?: false | { exclude?: true},
minifyParams?: false | { exclude?: true},
normalizeCharset?: false | import('postcss-normalize-charset').Options & { exclude?: true},
minifyFontValues?: false | import('postcss-minify-font-values').Options & { exclude?: true},
normalizeUrl?: false | import('postcss-normalize-url').Options & { exclude?: true},
mergeLonghand?: false | { exclude?: true},
discardDuplicates?: false | { exclude?: true},
discardOverridden?: false | { exclude?: true},
normalizeRepeatStyle?: false | { exclude?: true},
mergeRules?: false | { exclude?: true},
discardEmpty?: false | { exclude?: true},
uniqueSelectors?: false | { exclude?: true},
normalizeString?: false | import('postcss-normalize-string').Options & { exclude?: true},
normalizePositions?: false | { exclude?: true},
normalizeWhitespace?: false| { exclude?: true},
normalizeUnicode?: false | { exclude?: true},
normalizeDisplayValues?: false | { exclude?: true},
normalizeTimingFunctions?: false | { exclude?: true},
rawCache?: false | { exclude?: true}}} Options */
const defaultOpts = {

@@ -59,5 +89,10 @@ convertValues: {

module.exports = function defaultPreset(opts = {}) {
/**
* @param {Options} opts
* @return {{plugins: [import('postcss').PluginCreator<any>, boolean | Record<string, any> | undefined][]}}
*/
function defaultPreset(opts = {}) {
const options = Object.assign({}, defaultOpts, opts);
/** @type {[import('postcss').PluginCreator<any>, boolean | Record<string, any> | undefined][]} **/
const plugins = [

@@ -96,2 +131,4 @@ [postcssDiscardComments, options.discardComments],

return { plugins };
};
}
module.exports = defaultPreset;