cssnano 8.0.4 → 8.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +9 -6
- package/src/index.js +22 -21
- package/types/index.d.ts.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cssnano",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.5",
|
|
4
4
|
"description": "A modular minifier, built on top of the PostCSS ecosystem.",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"license": "MIT",
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"lilconfig": "^3.1.3",
|
|
31
|
-
"cssnano-preset-default": "^8.0.
|
|
31
|
+
"cssnano-preset-default": "^8.0.5"
|
|
32
32
|
},
|
|
33
33
|
"homepage": "https://github.com/cssnano/cssnano",
|
|
34
34
|
"author": {
|
|
@@ -53,12 +53,15 @@
|
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"autoprefixer": "^10.5.4",
|
|
56
|
-
"postcss": "^8.5.
|
|
56
|
+
"postcss": "^8.5.26",
|
|
57
57
|
"postcss-font-magician": "^4.0.0",
|
|
58
|
-
"cssnano-preset-advanced": "^8.0.
|
|
59
|
-
"cssnano-preset-lite": "^5.0.
|
|
58
|
+
"cssnano-preset-advanced": "^8.0.5",
|
|
59
|
+
"cssnano-preset-lite": "^5.0.3"
|
|
60
60
|
},
|
|
61
61
|
"peerDependencies": {
|
|
62
|
-
"postcss": "^8.5.
|
|
62
|
+
"postcss": "^8.5.26"
|
|
63
|
+
},
|
|
64
|
+
"scripts": {
|
|
65
|
+
"test": "node --test"
|
|
63
66
|
}
|
|
64
67
|
}
|
package/src/index.js
CHANGED
|
@@ -130,31 +130,32 @@ function cssnanoPlugin(options = {}) {
|
|
|
130
130
|
/** @type {Options} */ (options).preset = { plugins: [] };
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
require(pluginDef),
|
|
141
|
-
opts,
|
|
142
|
-
]);
|
|
143
|
-
} else {
|
|
144
|
-
/** @type {Options} */ (options).preset.plugins.push([
|
|
145
|
-
pluginDef,
|
|
146
|
-
opts,
|
|
147
|
-
]);
|
|
148
|
-
}
|
|
149
|
-
} else if (typeof plugin === 'string' && isResolvable(plugin)) {
|
|
133
|
+
const inputPlugins = /** @type {any[]} */ (
|
|
134
|
+
/** @type {Options} */ (options).plugins
|
|
135
|
+
);
|
|
136
|
+
for (const plugin of inputPlugins) {
|
|
137
|
+
if (Array.isArray(plugin)) {
|
|
138
|
+
const [pluginDef, opts = {}] = plugin;
|
|
139
|
+
if (typeof pluginDef === 'string' && isResolvable(pluginDef)) {
|
|
150
140
|
/** @type {Options} */ (options).preset.plugins.push([
|
|
151
|
-
require(
|
|
152
|
-
|
|
141
|
+
require(pluginDef),
|
|
142
|
+
opts,
|
|
153
143
|
]);
|
|
154
144
|
} else {
|
|
155
|
-
/** @type {Options} */ (options).preset.plugins.push([
|
|
145
|
+
/** @type {Options} */ (options).preset.plugins.push([
|
|
146
|
+
pluginDef,
|
|
147
|
+
opts,
|
|
148
|
+
]);
|
|
156
149
|
}
|
|
157
|
-
})
|
|
150
|
+
} else if (typeof plugin === 'string' && isResolvable(plugin)) {
|
|
151
|
+
/** @type {Options} */ (options).preset.plugins.push([
|
|
152
|
+
require(plugin),
|
|
153
|
+
{},
|
|
154
|
+
]);
|
|
155
|
+
} else {
|
|
156
|
+
/** @type {Options} */ (options).preset.plugins.push([plugin, {}]);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
158
159
|
}
|
|
159
160
|
const plugins = [];
|
|
160
161
|
const nanoPlugins = resolveConfig(options);
|
package/types/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.js"],"names":[],"mappings":"SAmLiB,aAAa;AA1K1B,YAAgE,OAAO,GAA7D;IAAC,MAAM,CAAC,EAAE,GAAG,CAAC;IAAC,OAAO,CAAC,EAAE,GAAG,EAAE,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAC,CAAS;AA6G3E;;;;GAIG;AACH,iBAAS,aAAa,CAAC,OAAO,KAAK,OAqDlC"}
|