cssnano-preset-lite 5.0.6 → 6.0.0

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 CHANGED
@@ -39,7 +39,7 @@ If you don't have npm then [check out this installation tutorial](https://npmjs.
39
39
 
40
40
  ### Configuration
41
41
 
42
- If you would like to use the default configuration, then you don't need to add anything to your `package.json`.
42
+ If you would like to use the default configuration, then you don't need any additional configuration.
43
43
 
44
44
  But should you wish to customise this, you can pass an array with the second parameter as the options object to use. For example, to remove all comments:
45
45
 
@@ -55,7 +55,8 @@ But should you wish to customise this, you can pass an array with the second par
55
55
  }
56
56
  ```
57
57
 
58
- Depending on your usage, the JSON configuration might not work for you, such as in cases where you would like to use options with customisable function parameters. For this use case, we recommend a `cssnano.config.js` at the same location as your `package.json`. You can then load a preset and export it with your custom parameters:
58
+ Depending on your usage, the JSON configuration might not work for you, such as in cases where you would like to use options with customisable function parameters.
59
+ For this use case, create use a `cssnano.config.js`. You can then load a preset and export it with your custom parameters:
59
60
 
60
61
  ```js
61
62
  const defaultPreset = require('cssnano-preset-lite');
package/package.json CHANGED
@@ -1,16 +1,12 @@
1
1
  {
2
2
  "name": "cssnano-preset-lite",
3
- "version": "5.0.6",
3
+ "version": "6.0.0",
4
4
  "description": "Safe and minimum transformation",
5
5
  "exports": {
6
6
  ".": {
7
7
  "types": "./types/index.d.ts",
8
8
  "default": "./src/index.js"
9
- },
10
- "./src": "./src/index.js",
11
- "./src/index": "./src/index.js",
12
- "./src/index.js": "./src/index.js",
13
- "./package.json": "./package.json"
9
+ }
14
10
  },
15
11
  "files": [
16
12
  "LICENSE-MIT",
@@ -19,10 +15,10 @@
19
15
  ],
20
16
  "license": "MIT",
21
17
  "dependencies": {
22
- "cssnano-utils": "^6.0.4",
23
- "postcss-discard-comments": "^8.0.4",
24
- "postcss-discard-empty": "^8.0.5",
25
- "postcss-normalize-whitespace": "^8.0.5"
18
+ "cssnano-utils": "^7.0.0",
19
+ "postcss-discard-comments": "^9.0.0",
20
+ "postcss-discard-empty": "^9.0.0",
21
+ "postcss-normalize-whitespace": "^9.0.0"
26
22
  },
27
23
  "repository": {
28
24
  "type": "git",
@@ -33,7 +29,7 @@
33
29
  "url": "https://github.com/cssnano/cssnano/issues"
34
30
  },
35
31
  "engines": {
36
- "node": "^22.11.0 || ^24.11.0 || >=26.0"
32
+ "node": "^22.22.3 || ^24.15.0 || >=26.0"
37
33
  },
38
34
  "devDependencies": {
39
35
  "postcss": "^8.5.26"
@@ -41,6 +37,7 @@
41
37
  "peerDependencies": {
42
38
  "postcss": "^8.5.26"
43
39
  },
40
+ "type": "module",
44
41
  "scripts": {
45
42
  "test": "node --test"
46
43
  }
package/src/index.js CHANGED
@@ -1,9 +1,9 @@
1
- 'use strict';
2
- const postcssDiscardComments = require('postcss-discard-comments');
3
- const postcssNormalizeWhitespace = require('postcss-normalize-whitespace');
4
- const postcssDiscardEmpty = require('postcss-discard-empty');
5
- const { rawCache } = require('cssnano-utils');
1
+ import postcssDiscardComments from 'postcss-discard-comments';
2
+ import postcssNormalizeWhitespace from 'postcss-normalize-whitespace';
3
+ import postcssDiscardEmpty from 'postcss-discard-empty';
4
+ import cssnanoUtils from 'cssnano-utils';
6
5
 
6
+ const { rawCache } = cssnanoUtils;
7
7
  /**
8
8
  * @template {object | void} [OptionsExtends=void]
9
9
  * @typedef {false | OptionsExtends & {exclude?: true}} SimpleOptions
@@ -58,5 +58,6 @@ function litePreset(opts = {}) {
58
58
  ),
59
59
  };
60
60
  }
61
+ const moduleExports = litePreset;
61
62
 
62
- module.exports = litePreset;
63
+ export { moduleExports as default, moduleExports as 'module.exports' };
package/types/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- export = litePreset;
2
1
  export type SimpleOptions<OptionsExtends extends object | void = void> = false | (OptionsExtends & {
3
2
  exclude?: true;
4
3
  });
@@ -17,4 +16,6 @@ export type LiteOptions = {
17
16
  declare function litePreset(opts?: LiteOptions): {
18
17
  plugins: [import('postcss').PluginCreator<any>, LiteOptions[keyof LiteOptions]][];
19
18
  };
19
+ declare const moduleExports: typeof litePreset;
20
+ export { moduleExports as default, moduleExports as 'module.exports' };
20
21
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.js"],"names":[],"mappings":"SA6DiB,UAAU;AArDxB,YAAqD,aAAa,CADvC,cAAc,SAA9B,MAAM,GAAG,IAAI,GAAkB,IAAK,IACrC,KAAK,IAAG,cAAc,GAAG;IAAC,OAAO,CAAC,EAAE,IAAI,CAAA;CAAC,CAAA,CAAe;AAIlE,YAAkB,WAAW,GAC7B;IAAuE,eAAe,AAAtF,CACA,EADW,aAAa,CAAC,OAAO,0BAA0B,EAAE,OAAO,CAAC,CACpE;IAA2B,mBAAmB,AAA9C,CACA,EADW,aAAa,CACxB;IAA2B,YAAY,AAAvC,CACA,EADW,aAAa,CACxB;IAA2B,QAAQ,AAAnC,CAAoC,EAAzB,aAAa,CAAY;CAAA,CAAA;AAyBvC;;;;;GAKG;AACH,iBAAS,UAAU,CAAC,IAAI,GAHb,WAGkB,GAFhB;IAAE,OAAO,EAAE,CAAC,OAAO,SAAS,EAAE,aAAa,CAAC,GAAG,CAAC,EAAE,WAAW,CAAC,MAAM,WAAW,CAAC,CAAC,EAAE,CAAA;CAAE,CAcjG"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.js"],"names":[],"mappings":"AAQG,YAAqD,aAAa,CADvC,cAAc,SAA9B,MAAM,GAAG,IAAI,GAAkB,IAAK,IACrC,KAAK,IAAG,cAAc,GAAG;IAAC,OAAO,CAAC,EAAE,IAAI,CAAA;CAAC,CAAA,CAAe;AAIlE,YAAkB,WAAW,GAC7B;IAAuE,eAAe,AAAtF,CACA,EADW,aAAa,CAAC,OAAO,0BAA0B,EAAE,OAAO,CAAC,CACpE;IAA2B,mBAAmB,AAA9C,CACA,EADW,aAAa,CACxB;IAA2B,YAAY,AAAvC,CACA,EADW,aAAa,CACxB;IAA2B,QAAQ,AAAnC,CAAoC,EAAzB,aAAa,CAAY;CAAA,CAAA;AAyBvC;;;;;GAKG;AACH,iBAAS,UAAU,CAAC,IAAI,GAHb,WAGkB,GAFhB;IAAE,OAAO,EAAE,CAAC,OAAO,SAAS,EAAE,aAAa,CAAC,GAAG,CAAC,EAAE,WAAW,CAAC,MAAM,WAAW,CAAC,CAAC,EAAE,CAAA;CAAE,CAcjG;AACD,QAAA,MAAM,aAAa,mBAAa,CAAC;AAEjC,OAAO,EAAE,aAAa,IAAI,OAAO,EAAE,aAAa,IAAI,gBAAgB,EAAE,CAAC"}