cssnano-preset-lite 2.1.0 → 2.1.1

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cssnano-preset-lite",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "main": "src/index.js",
5
5
  "types": "types/index.d.ts",
6
6
  "description": "Safe and minimum transformation",
package/src/index.js CHANGED
@@ -15,7 +15,7 @@ const defaultOpts = {};
15
15
  * @param {Options} opts
16
16
  * @return {{plugins: [import('postcss').PluginCreator<any>, false | Record<string, any> | undefined][]}}
17
17
  */
18
- module.exports = function defaultPreset(opts = {}) {
18
+ function defaultPreset(opts = {}) {
19
19
  const options = Object.assign({}, defaultOpts, opts);
20
20
  /** @type {[import('postcss').PluginCreator<any>, false | Record<string, any> | undefined][]} **/
21
21
  const plugins = [
@@ -26,4 +26,6 @@ module.exports = function defaultPreset(opts = {}) {
26
26
  ];
27
27
 
28
28
  return { plugins };
29
- };
29
+ }
30
+
31
+ module.exports = defaultPreset;
package/types/index.d.ts CHANGED
@@ -1,11 +1,15 @@
1
- declare function _exports(opts?: Options): {
1
+ export = defaultPreset;
2
+ /**
3
+ * @param {Options} opts
4
+ * @return {{plugins: [import('postcss').PluginCreator<any>, false | Record<string, any> | undefined][]}}
5
+ */
6
+ declare function defaultPreset(opts?: Options): {
2
7
  plugins: [import('postcss').PluginCreator<any>, false | Record<string, any> | undefined][];
3
8
  };
4
- export = _exports;
5
- export type SimpleOptions = false | {
6
- exclude?: true;
7
- };
8
- export type Options = {
9
+ declare namespace defaultPreset {
10
+ export { SimpleOptions, Options };
11
+ }
12
+ type Options = {
9
13
  discardComments?: false | import('postcss-discard-comments').Options & {
10
14
  exclude?: true;
11
15
  };
@@ -13,4 +17,7 @@ export type Options = {
13
17
  discardEmpty?: SimpleOptions;
14
18
  rawCache?: SimpleOptions;
15
19
  };
20
+ type SimpleOptions = false | {
21
+ exclude?: true;
22
+ };
16
23
  import { rawCache } from "cssnano-utils";