cssnano-preset-default 7.0.2 → 7.0.4
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/README.md +16 -1
- package/package.json +13 -13
- package/src/index.js +13 -0
- package/types/index.d.ts +7 -7
- package/types/index.d.ts.map +1 -1
package/README.md
CHANGED
|
@@ -278,7 +278,22 @@ This plugin is loaded with its default configuration.
|
|
|
278
278
|
|
|
279
279
|
> Optimise inline SVG with PostCSS.
|
|
280
280
|
|
|
281
|
-
This plugin is loaded with
|
|
281
|
+
This plugin is loaded with the following configuration:
|
|
282
|
+
|
|
283
|
+
```js
|
|
284
|
+
{
|
|
285
|
+
plugins: [
|
|
286
|
+
{
|
|
287
|
+
name: 'preset-default',
|
|
288
|
+
params: {
|
|
289
|
+
overrides: {
|
|
290
|
+
removeViewBox: false,
|
|
291
|
+
},
|
|
292
|
+
},
|
|
293
|
+
},
|
|
294
|
+
],
|
|
295
|
+
}
|
|
296
|
+
```
|
|
282
297
|
|
|
283
298
|
### [`postcss-unique-selectors`](https://github.com/cssnano/cssnano/tree/master/packages/postcss-unique-selectors)
|
|
284
299
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cssnano-preset-default",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.4",
|
|
4
4
|
"main": "src/index.js",
|
|
5
5
|
"types": "types/index.d.ts",
|
|
6
6
|
"description": "Safe defaults for cssnano which require minimal configuration.",
|
|
@@ -11,33 +11,33 @@
|
|
|
11
11
|
],
|
|
12
12
|
"license": "MIT",
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"browserslist": "^4.23.
|
|
14
|
+
"browserslist": "^4.23.1",
|
|
15
15
|
"css-declaration-sorter": "^7.2.0",
|
|
16
16
|
"postcss-calc": "^10.0.0",
|
|
17
17
|
"cssnano-utils": "^5.0.0",
|
|
18
|
-
"postcss-colormin": "^7.0.
|
|
19
|
-
"postcss-convert-values": "^7.0.
|
|
20
|
-
"postcss-discard-comments": "^7.0.
|
|
18
|
+
"postcss-colormin": "^7.0.1",
|
|
19
|
+
"postcss-convert-values": "^7.0.2",
|
|
20
|
+
"postcss-discard-comments": "^7.0.1",
|
|
21
21
|
"postcss-discard-duplicates": "^7.0.0",
|
|
22
22
|
"postcss-discard-empty": "^7.0.0",
|
|
23
23
|
"postcss-discard-overridden": "^7.0.0",
|
|
24
|
-
"postcss-merge-longhand": "^7.0.
|
|
25
|
-
"postcss-merge-rules": "^7.0.
|
|
24
|
+
"postcss-merge-longhand": "^7.0.2",
|
|
25
|
+
"postcss-merge-rules": "^7.0.2",
|
|
26
26
|
"postcss-minify-font-values": "^7.0.0",
|
|
27
27
|
"postcss-minify-gradients": "^7.0.0",
|
|
28
|
-
"postcss-minify-params": "^7.0.
|
|
29
|
-
"postcss-minify-selectors": "^7.0.
|
|
28
|
+
"postcss-minify-params": "^7.0.1",
|
|
29
|
+
"postcss-minify-selectors": "^7.0.2",
|
|
30
30
|
"postcss-normalize-charset": "^7.0.0",
|
|
31
31
|
"postcss-normalize-display-values": "^7.0.0",
|
|
32
32
|
"postcss-normalize-positions": "^7.0.0",
|
|
33
33
|
"postcss-normalize-repeat-style": "^7.0.0",
|
|
34
34
|
"postcss-normalize-string": "^7.0.0",
|
|
35
35
|
"postcss-normalize-timing-functions": "^7.0.0",
|
|
36
|
-
"postcss-normalize-unicode": "^7.0.
|
|
36
|
+
"postcss-normalize-unicode": "^7.0.1",
|
|
37
37
|
"postcss-normalize-url": "^7.0.0",
|
|
38
38
|
"postcss-normalize-whitespace": "^7.0.0",
|
|
39
|
-
"postcss-ordered-values": "^7.0.
|
|
40
|
-
"postcss-reduce-initial": "^7.0.
|
|
39
|
+
"postcss-ordered-values": "^7.0.1",
|
|
40
|
+
"postcss-reduce-initial": "^7.0.1",
|
|
41
41
|
"postcss-reduce-transforms": "^7.0.0",
|
|
42
42
|
"postcss-svgo": "^7.0.1",
|
|
43
43
|
"postcss-unique-selectors": "^7.0.1"
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"node": "^18.12.0 || ^20.9.0 || >=22.0"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"postcss": "^8.4.
|
|
59
|
+
"postcss": "^8.4.39"
|
|
60
60
|
},
|
|
61
61
|
"peerDependencies": {
|
|
62
62
|
"postcss": "^8.4.31"
|
package/src/index.js
CHANGED
|
@@ -131,6 +131,19 @@ function configurePlugins(plugins, opts = {}) {
|
|
|
131
131
|
cssDeclarationSorter: {
|
|
132
132
|
keepOverrides: true,
|
|
133
133
|
},
|
|
134
|
+
svgo: {
|
|
135
|
+
plugins: [
|
|
136
|
+
{
|
|
137
|
+
name: 'preset-default',
|
|
138
|
+
params: {
|
|
139
|
+
overrides: {
|
|
140
|
+
removeViewBox: false,
|
|
141
|
+
removeTitle: false,
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
],
|
|
146
|
+
},
|
|
134
147
|
};
|
|
135
148
|
|
|
136
149
|
// Merge option properties for each plugin
|
package/types/index.d.ts
CHANGED
|
@@ -6,15 +6,18 @@ export = defaultPreset;
|
|
|
6
6
|
* @returns {{ plugins: [import('postcss').PluginCreator<any>, Options[keyof Options]][] }}
|
|
7
7
|
*/
|
|
8
8
|
declare function defaultPreset(opts?: Options & AutoprefixerOptions & BrowserslistOptions): {
|
|
9
|
-
plugins: [import(
|
|
9
|
+
plugins: [import("postcss").PluginCreator<any>, Options[keyof Options]][];
|
|
10
10
|
};
|
|
11
11
|
declare namespace defaultPreset {
|
|
12
12
|
export { SimpleOptions, Options, AutoprefixerOptions, BrowserslistOptions };
|
|
13
13
|
}
|
|
14
|
+
type SimpleOptions<OptionsExtends extends object | void = void> = false | (OptionsExtends & {
|
|
15
|
+
exclude?: true;
|
|
16
|
+
});
|
|
14
17
|
type Options = {
|
|
15
18
|
cssDeclarationSorter?: SimpleOptions<{
|
|
16
|
-
order?: ("alphabetical" | "concentric-css" | "smacss") | ((propertyNameA: string, propertyNameB: string) =>
|
|
17
|
-
keepOverrides?: boolean
|
|
19
|
+
order?: ("alphabetical" | "concentric-css" | "smacss") | ((propertyNameA: string, propertyNameB: string) => -1 | 0 | 1) | undefined;
|
|
20
|
+
keepOverrides?: boolean;
|
|
18
21
|
} | undefined> | undefined;
|
|
19
22
|
discardComments?: SimpleOptions<postcssDiscardComments.Options> | undefined;
|
|
20
23
|
reduceInitial?: SimpleOptions<postcssReduceInitial.Options> | undefined;
|
|
@@ -48,10 +51,7 @@ type Options = {
|
|
|
48
51
|
type AutoprefixerOptions = {
|
|
49
52
|
overrideBrowserslist?: string | string[];
|
|
50
53
|
};
|
|
51
|
-
type BrowserslistOptions = Pick<import(
|
|
52
|
-
type SimpleOptions<OptionsExtends extends void | object = void> = false | (OptionsExtends & {
|
|
53
|
-
exclude?: true;
|
|
54
|
-
});
|
|
54
|
+
type BrowserslistOptions = Pick<import("browserslist").Options, "stats" | "path" | "env">;
|
|
55
55
|
import postcssDiscardComments = require("postcss-discard-comments");
|
|
56
56
|
import postcssReduceInitial = require("postcss-reduce-initial");
|
|
57
57
|
import postcssSvgo = require("postcss-svgo");
|
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":";AAkKA;;;;;GAKG;AACH,sCAHW,OAAO,GAAG,mBAAmB,GAAG,mBAAmB,GACjD;IAAE,OAAO,EAAE,CAAC,OAAO,SAAS,EAAE,aAAa,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,MAAM,OAAO,CAAC,CAAC,EAAE,CAAA;CAAE,CAuCzF;;;;mBA/J6B,cAAc,SAA9B,MAAM,GAAG,IAAK,WACf,KAAK,IAAG,cAAc,GAAG;IAAC,OAAO,CAAC,EAAE,IAAI,CAAA;CAAC,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAqCzC;IAAE,oBAAoB,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;CAAE;2BAC5C,IAAI,CAAC,OAAO,cAAc,EAAE,OAAO,EAAE,OAAO,GAAG,MAAM,GAAG,KAAK,CAAC"}
|