@node-minify/html-minifier 10.0.0-next.0 → 10.0.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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2024 Rodolphe Stoclin
3
+ Copyright (c) 2025 Rodolphe Stoclin
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -6,8 +6,8 @@
6
6
  <br>
7
7
  <a href="https://npmjs.org/package/@node-minify/html-minifier"><img src="https://img.shields.io/npm/v/@node-minify/html-minifier.svg"></a>
8
8
  <a href="https://npmjs.org/package/@node-minify/html-minifier"><img src="https://img.shields.io/npm/dm/@node-minify/html-minifier.svg"></a>
9
- <a href="https://github.com/srod/node-minify/actions"><img alt="Build Status" src="https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fsrod%2Fnode-minify%2Fbadge%3Fref%3Ddevelop&style=flat" /></a>
10
- <a href="https://codecov.io/gh/srod/node-minify"><img src="https://codecov.io/gh/srod/node-minify/branch/develop/graph/badge.svg"></a>
9
+ <a href="https://github.com/srod/node-minify/actions"><img alt="Build Status" src="https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fsrod%2Fnode-minify%2Fbadge%3Fref%3Dmain&style=flat" /></a>
10
+ <a href="https://codecov.io/gh/srod/node-minify"><img src="https://codecov.io/gh/srod/node-minify/branch/main/graph/badge.svg"></a>
11
11
  </p>
12
12
 
13
13
  # html-minifier
@@ -25,14 +25,13 @@ npm install @node-minify/core @node-minify/html-minifier
25
25
  ## Usage
26
26
 
27
27
  ```js
28
- const minify = require('@node-minify/core');
29
- const htmlMinifier = require('@node-minify/html-minifier');
28
+ import { minify } from '@node-minify/core';
29
+ import { htmlMinifier } from '@node-minify/html-minifier';
30
30
 
31
- minify({
31
+ await minify({
32
32
  compressor: htmlMinifier,
33
- input: 'foo.js',
34
- output: 'bar.js',
35
- callback: function (err, min) {}
33
+ input: 'foo.html',
34
+ output: 'bar.html'
36
35
  });
37
36
  ```
38
37
 
@@ -42,4 +41,4 @@ Visit https://node-minify.2clics.net/compressors/html-minifier.html for full doc
42
41
 
43
42
  ## License
44
43
 
45
- [MIT](https://github.com/srod/node-minify/blob/develop/LICENSE)
44
+ [MIT](https://github.com/srod/node-minify/blob/main/LICENSE)
package/dist/index.d.ts CHANGED
@@ -1,15 +1,155 @@
1
- import { MinifierOptions } from '@node-minify/types';
1
+ //#region ../types/src/types.d.ts
2
2
 
3
- /*!
4
- * node-minify
5
- * Copyright(c) 2011-2024 Rodolphe Stoclin
6
- * MIT Licensed
3
+ /**
4
+ * Result returned by a compressor function.
7
5
  */
6
+ type CompressorResult = {
7
+ code: string;
8
+ map?: string;
9
+ };
10
+ /**
11
+ * Base options that all compressors can accept.
12
+ * Specific compressors may extend this with their own options.
13
+ */
14
+ type CompressorOptions = Record<string, unknown>;
15
+ /**
16
+ * A compressor function that minifies content.
17
+ * @param args - The minifier options including settings and content
18
+ * @returns A promise resolving to the compression result
19
+ */
20
+ type Compressor<TOptions extends CompressorOptions = CompressorOptions> = (args: MinifierOptions<TOptions>) => Promise<CompressorResult>;
21
+ /**
22
+ * File type for compressors that support multiple types (e.g., YUI).
23
+ */
24
+ type FileType = "js" | "css";
25
+ /**
26
+ * User-facing settings for the minify function.
27
+ * This is what users pass when calling minify().
28
+ *
29
+ * @example
30
+ * ```ts
31
+ * import { minify } from '@node-minify/core';
32
+ * import { terser } from '@node-minify/terser';
33
+ *
34
+ * await minify({
35
+ * compressor: terser,
36
+ * input: 'src/*.js',
37
+ * output: 'dist/bundle.min.js',
38
+ * options: { mangle: true }
39
+ * });
40
+ * ```
41
+ */
42
+ type Settings<TOptions extends CompressorOptions = CompressorOptions> = {
43
+ /**
44
+ * The compressor function to use for minification.
45
+ */
46
+ compressor: Compressor<TOptions>;
47
+
48
+ /**
49
+ * Optional label for the compressor (used in logging).
50
+ */
51
+ compressorLabel?: string;
52
+
53
+ /**
54
+ * Content to minify (for in-memory minification).
55
+ * If provided, input/output are not required.
56
+ */
57
+ content?: string;
58
+
59
+ /**
60
+ * Input file path(s) or glob pattern.
61
+ * Can be a single file, array of files, or wildcard pattern.
62
+ *
63
+ * @example
64
+ * - 'src/app.js'
65
+ * - ['src/a.js', 'src/b.js']
66
+ * - 'src/**\/*.js'
67
+ */
68
+ input?: string | string[];
69
+
70
+ /**
71
+ * Output file path.
72
+ * Use $1 as placeholder for input filename in multi-file scenarios.
73
+ * Can be a single file, array of files, or pattern with $1.
74
+ *
75
+ * @example
76
+ * - 'dist/bundle.min.js'
77
+ * - ['file1.min.js', 'file2.min.js']
78
+ * - '$1.min.js' (creates app.min.js from app.js)
79
+ */
80
+ output?: string | string[];
8
81
 
9
- declare const minifyHTMLMinifier: {
10
- ({ settings, content, callback, index, }: MinifierOptions): string | void;
11
- default: any;
82
+ /**
83
+ * Compressor-specific options.
84
+ * See individual compressor documentation for available options.
85
+ */
86
+ options?: TOptions;
87
+
88
+ /**
89
+ * CLI option string (used by CLI only).
90
+ * @internal
91
+ */
92
+ option?: string;
93
+
94
+ /**
95
+ * Buffer size for file operations (in bytes).
96
+ * @default 1024000 (1MB)
97
+ */
98
+ buffer?: number;
99
+
100
+ /**
101
+ * File type for compressors that support multiple types.
102
+ * Required for YUI compressor.
103
+ */
104
+ type?: FileType;
105
+
106
+ /**
107
+ * Suppress console output.
108
+ * @default false
109
+ */
110
+ silence?: boolean;
111
+
112
+ /**
113
+ * Public folder to prepend to input paths.
114
+ *
115
+ * @example
116
+ * With publicFolder: 'public/js/' and input: 'app.js',
117
+ * the actual path becomes 'public/js/app.js'
118
+ */
119
+ publicFolder?: string;
120
+
121
+ /**
122
+ * Replace files in place instead of creating new output files.
123
+ * @default false
124
+ */
125
+ replaceInPlace?: boolean;
12
126
  };
127
+ /**
128
+ * Options passed to compressor functions internally.
129
+ * This is what compressors receive, not what users pass.
130
+ */
131
+ type MinifierOptions<TOptions extends CompressorOptions = CompressorOptions> = {
132
+ /**
133
+ * The full settings object.
134
+ */
135
+ settings: Settings<TOptions>;
13
136
 
14
- export { minifyHTMLMinifier as default };
15
- export = minifyHTMLMinifier
137
+ /**
138
+ * The content to minify.
139
+ */
140
+ content?: string;
141
+
142
+ /**
143
+ * Index of current file when processing multiple files.
144
+ */
145
+ index?: number;
146
+ };
147
+ //#endregion
148
+ //#region src/index.d.ts
149
+ declare function htmlMinifier({
150
+ settings,
151
+ content
152
+ }: MinifierOptions): Promise<CompressorResult>;
153
+ //#endregion
154
+ export { htmlMinifier };
155
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","names":["CompressorReturnType","CompressorResult","CompressorOptions","Record","Compressor","TOptions","MinifierOptions","Promise","FileType","Settings","Result","MinifyOptions"],"sources":["../../types/src/types.d.ts","../src/index.ts"],"sourcesContent":["/*!\n * node-minify\n * Copyright(c) 2011-2025 Rodolphe Stoclin\n * MIT Licensed\n */\n\n/**\n * The return type of a compressor function.\n * @deprecated Use `CompressorResult` instead. Will be removed in v11.\n */\nexport type CompressorReturnType = string;\n\n/**\n * Result returned by a compressor function.\n */\nexport type CompressorResult = {\n code: string;\n map?: string;\n};\n\n/**\n * Base options that all compressors can accept.\n * Specific compressors may extend this with their own options.\n */\nexport type CompressorOptions = Record<string, unknown>;\n\n/**\n * A compressor function that minifies content.\n * @param args - The minifier options including settings and content\n * @returns A promise resolving to the compression result\n */\nexport type Compressor<TOptions extends CompressorOptions = CompressorOptions> =\n (args: MinifierOptions<TOptions>) => Promise<CompressorResult>;\n\n/**\n * File type for compressors that support multiple types (e.g., YUI).\n */\nexport type FileType = \"js\" | \"css\";\n\n/**\n * User-facing settings for the minify function.\n * This is what users pass when calling minify().\n *\n * @example\n * ```ts\n * import { minify } from '@node-minify/core';\n * import { terser } from '@node-minify/terser';\n *\n * await minify({\n * compressor: terser,\n * input: 'src/*.js',\n * output: 'dist/bundle.min.js',\n * options: { mangle: true }\n * });\n * ```\n */\nexport type Settings<TOptions extends CompressorOptions = CompressorOptions> = {\n /**\n * The compressor function to use for minification.\n */\n compressor: Compressor<TOptions>;\n\n /**\n * Optional label for the compressor (used in logging).\n */\n compressorLabel?: string;\n\n /**\n * Content to minify (for in-memory minification).\n * If provided, input/output are not required.\n */\n content?: string;\n\n /**\n * Input file path(s) or glob pattern.\n * Can be a single file, array of files, or wildcard pattern.\n *\n * @example\n * - 'src/app.js'\n * - ['src/a.js', 'src/b.js']\n * - 'src/**\\/*.js'\n */\n input?: string | string[];\n\n /**\n * Output file path.\n * Use $1 as placeholder for input filename in multi-file scenarios.\n * Can be a single file, array of files, or pattern with $1.\n *\n * @example\n * - 'dist/bundle.min.js'\n * - ['file1.min.js', 'file2.min.js']\n * - '$1.min.js' (creates app.min.js from app.js)\n */\n output?: string | string[];\n\n /**\n * Compressor-specific options.\n * See individual compressor documentation for available options.\n */\n options?: TOptions;\n\n /**\n * CLI option string (used by CLI only).\n * @internal\n */\n option?: string;\n\n /**\n * Buffer size for file operations (in bytes).\n * @default 1024000 (1MB)\n */\n buffer?: number;\n\n /**\n * File type for compressors that support multiple types.\n * Required for YUI compressor.\n */\n type?: FileType;\n\n /**\n * Suppress console output.\n * @default false\n */\n silence?: boolean;\n\n /**\n * Public folder to prepend to input paths.\n *\n * @example\n * With publicFolder: 'public/js/' and input: 'app.js',\n * the actual path becomes 'public/js/app.js'\n */\n publicFolder?: string;\n\n /**\n * Replace files in place instead of creating new output files.\n * @default false\n */\n replaceInPlace?: boolean;\n};\n\n/**\n * Options passed to compressor functions internally.\n * This is what compressors receive, not what users pass.\n */\nexport type MinifierOptions<\n TOptions extends CompressorOptions = CompressorOptions,\n> = {\n /**\n * The full settings object.\n */\n settings: Settings<TOptions>;\n\n /**\n * The content to minify.\n */\n content?: string;\n\n /**\n * Index of current file when processing multiple files.\n */\n index?: number;\n};\n\n/**\n * Result returned after compression (used by CLI).\n */\nexport type Result = {\n /**\n * Label of the compressor used.\n */\n compressorLabel: string;\n\n /**\n * Size of minified content (formatted string, e.g., \"1.5 KB\").\n */\n size: string;\n\n /**\n * Gzipped size of minified content (formatted string).\n */\n sizeGzip: string;\n};\n\n/**\n * Type alias for user convenience.\n * @deprecated Use `Settings` instead. Will be removed in v11.\n */\nexport type MinifyOptions<\n TOptions extends CompressorOptions = CompressorOptions,\n> = Settings<TOptions>;\n"],"mappings":";;AAwDA;;;AAI2BK,KA7CfJ,gBAAAA,GA6CeI;EAAXD,IAAAA,EAAAA,MAAAA;EAwCFC,GAAAA,CAAAA,EAAAA,MAAAA;CAkBHG;AA4BX;;;;AAMcC,KAhIFP,iBAAAA,GAAoBC,MAgIlBM,CAAAA,MAAAA,EAAAA,OAAAA,CAAAA;;;;ACtId;;AAEI,KDWQL,UCXR,CAAA,iBDWoCF,iBCXpC,GDWwDA,iBCXxD,CAAA,GACD,CAAA,IAAA,EDWQI,eCXR,CDWwBD,QCXxB,CAAA,EAAA,GDWsCE,OCXtC,CDW8CN,gBCX9C,CAAA;;;;KDgBSO,QAAAA;;;;;;;;;;;;;;;;;;KAmBAC,0BAA0BP,oBAAoBA;;;;cAI1CE,WAAWC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAwCbA;;;;;;;;;;;;;;;;;;SAkBHG;;;;;;;;;;;;;;;;;;;;;;;;;;;KA4BCF,iCACSJ,oBAAoBA;;;;YAK3BO,SAASJ;;;;;;;;;;;;;;AAzIXJ,iBCGU,YAAA,CDHM;EAAA,QAAA;EAAA;AAAA,CAAA,ECMzB,eDNyB,CAAA,ECMP,ODNO,CCMC,gBDND,CAAA"}
package/dist/index.js CHANGED
@@ -1,51 +1,28 @@
1
- // src/index.ts
2
- import { utils } from "@node-minify/utils";
3
- import minifier from "html-minifier";
4
- var HTMLMinifier = minifier.minify;
5
- var defaultOptions = {
6
- collapseBooleanAttributes: true,
7
- collapseInlineTagWhitespace: true,
8
- collapseWhitespace: true,
9
- minifyCSS: true,
10
- minifyJS: true,
11
- removeAttributeQuotes: true,
12
- removeCDATASectionsFromCDATA: true,
13
- removeComments: true,
14
- removeCommentsFromCDATA: true,
15
- removeEmptyAttributes: true,
16
- removeOptionalTags: true,
17
- removeRedundantAttributes: true,
18
- removeScriptTypeAttributes: true,
19
- removeStyleLinkTypeAttributes: true,
20
- useShortDoctype: true
1
+ //#region src/index.ts
2
+ const defaultOptions = {
3
+ collapseBooleanAttributes: true,
4
+ collapseInlineTagWhitespace: true,
5
+ collapseWhitespace: true,
6
+ minifyCSS: true,
7
+ minifyJS: true,
8
+ removeAttributeQuotes: true,
9
+ removeComments: true,
10
+ removeEmptyAttributes: true,
11
+ removeOptionalTags: true,
12
+ removeRedundantAttributes: true,
13
+ removeScriptTypeAttributes: true,
14
+ removeStyleLinkTypeAttributes: true,
15
+ useShortDoctype: true
21
16
  };
22
- var minifyHTMLMinifier = ({
23
- settings,
24
- content,
25
- callback,
26
- index
27
- }) => {
28
- const options = Object.assign({}, defaultOptions, settings?.options);
29
- const contentMinified = HTMLMinifier(content ?? "", options);
30
- if (settings && !settings.content && settings.output) {
31
- settings.output && utils.writeFile({
32
- file: settings.output,
33
- content: contentMinified,
34
- index
35
- });
36
- }
37
- if (callback) {
38
- return callback(null, contentMinified);
39
- }
40
- return contentMinified;
41
- };
42
- minifyHTMLMinifier.default = minifyHTMLMinifier;
43
- var src_default = minifyHTMLMinifier;
44
- export {
45
- src_default as default
46
- };
47
- /*!
48
- * node-minify
49
- * Copyright(c) 2011-2024 Rodolphe Stoclin
50
- * MIT Licensed
51
- */
17
+ async function htmlMinifier({ settings, content }) {
18
+ const { minify } = await import("html-minifier-next");
19
+ const options = {
20
+ ...defaultOptions,
21
+ ...settings?.options
22
+ };
23
+ return { code: await minify(content ?? "", options) };
24
+ }
25
+
26
+ //#endregion
27
+ export { htmlMinifier };
28
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["import type { CompressorResult, MinifierOptions } from \"@node-minify/types\";\n\nconst defaultOptions = {\n collapseBooleanAttributes: true,\n collapseInlineTagWhitespace: true,\n collapseWhitespace: true,\n minifyCSS: true,\n minifyJS: true,\n removeAttributeQuotes: true,\n removeComments: true,\n removeEmptyAttributes: true,\n removeOptionalTags: true,\n removeRedundantAttributes: true,\n removeScriptTypeAttributes: true,\n removeStyleLinkTypeAttributes: true,\n useShortDoctype: true,\n};\n\nexport async function htmlMinifier({\n settings,\n content,\n}: MinifierOptions): Promise<CompressorResult> {\n const { minify } = await import(\"html-minifier-next\");\n const options = { ...defaultOptions, ...settings?.options };\n const code = await minify(content ?? \"\", options);\n\n return { code };\n}\n"],"mappings":";AAEA,MAAM,iBAAiB;CACnB,2BAA2B;CAC3B,6BAA6B;CAC7B,oBAAoB;CACpB,WAAW;CACX,UAAU;CACV,uBAAuB;CACvB,gBAAgB;CAChB,uBAAuB;CACvB,oBAAoB;CACpB,2BAA2B;CAC3B,4BAA4B;CAC5B,+BAA+B;CAC/B,iBAAiB;CACpB;AAED,eAAsB,aAAa,EAC/B,UACA,WAC2C;CAC3C,MAAM,EAAE,WAAW,MAAM,OAAO;CAChC,MAAM,UAAU;EAAE,GAAG;EAAgB,GAAG,UAAU;EAAS;AAG3D,QAAO,EAAE,MAFI,MAAM,OAAO,WAAW,IAAI,QAAQ,EAElC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@node-minify/html-minifier",
3
- "version": "10.0.0-next.0",
3
+ "version": "10.0.1",
4
4
  "description": "html-minifier plugin for @node-minify",
5
5
  "keywords": [
6
6
  "compressor",
@@ -13,20 +13,19 @@
13
13
  "license": "MIT",
14
14
  "type": "module",
15
15
  "engines": {
16
- "node": ">=22.0.0"
16
+ "node": ">=20.0.0"
17
17
  },
18
18
  "directories": {
19
19
  "lib": "dist",
20
20
  "test": "__tests__"
21
21
  },
22
- "main": "./dist/index.cjs",
22
+ "types": "./dist/index.d.ts",
23
+ "main": "./dist/index.js",
23
24
  "exports": {
24
- "./package.json": "./package.json",
25
- ".": {
26
- "import": "./dist/index.js",
27
- "default": "./dist/index.cjs"
28
- }
25
+ "types": "./dist/index.d.ts",
26
+ "default": "./dist/index.js"
29
27
  },
28
+ "sideEffects": false,
30
29
  "files": [
31
30
  "dist/**/*"
32
31
  ],
@@ -41,21 +40,22 @@
41
40
  "url": "https://github.com/srod/node-minify/issues"
42
41
  },
43
42
  "scripts": {
44
- "build": "tsup src/index.ts --format cjs,esm --dts --clean && bunx fix-tsup-cjs",
45
- "check-exports": "attw --pack .",
43
+ "build": "tsdown src/index.ts",
44
+ "check-exports": "attw --pack . --profile esm-only",
46
45
  "format:check": "biome check .",
47
46
  "lint": "biome lint .",
48
47
  "prepublishOnly": "bun run build",
49
48
  "test": "vitest run",
50
49
  "test:ci": "vitest run --coverage",
51
- "test:watch": "vitest"
50
+ "test:watch": "vitest",
51
+ "typecheck": "tsc --noEmit",
52
+ "dev": "tsdown src/index.ts --watch"
52
53
  },
53
54
  "dependencies": {
54
55
  "@node-minify/utils": "workspace:*",
55
- "html-minifier": "4.0.0"
56
+ "html-minifier-next": "^4.14.3"
56
57
  },
57
58
  "devDependencies": {
58
- "@node-minify/types": "workspace:*",
59
- "@types/html-minifier": "^4.0.5"
59
+ "@node-minify/types": "workspace:*"
60
60
  }
61
61
  }
package/dist/index.cjs DELETED
@@ -1,89 +0,0 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
-
30
- // src/index.ts
31
- var src_exports = {};
32
- __export(src_exports, {
33
- default: () => src_default
34
- });
35
- module.exports = __toCommonJS(src_exports);
36
- var import_utils = require("@node-minify/utils");
37
- var import_html_minifier = __toESM(require("html-minifier"), 1);
38
- var HTMLMinifier = import_html_minifier.default.minify;
39
- var defaultOptions = {
40
- collapseBooleanAttributes: true,
41
- collapseInlineTagWhitespace: true,
42
- collapseWhitespace: true,
43
- minifyCSS: true,
44
- minifyJS: true,
45
- removeAttributeQuotes: true,
46
- removeCDATASectionsFromCDATA: true,
47
- removeComments: true,
48
- removeCommentsFromCDATA: true,
49
- removeEmptyAttributes: true,
50
- removeOptionalTags: true,
51
- removeRedundantAttributes: true,
52
- removeScriptTypeAttributes: true,
53
- removeStyleLinkTypeAttributes: true,
54
- useShortDoctype: true
55
- };
56
- var minifyHTMLMinifier = ({
57
- settings,
58
- content,
59
- callback,
60
- index
61
- }) => {
62
- const options = Object.assign({}, defaultOptions, settings?.options);
63
- const contentMinified = HTMLMinifier(content ?? "", options);
64
- if (settings && !settings.content && settings.output) {
65
- settings.output && import_utils.utils.writeFile({
66
- file: settings.output,
67
- content: contentMinified,
68
- index
69
- });
70
- }
71
- if (callback) {
72
- return callback(null, contentMinified);
73
- }
74
- return contentMinified;
75
- };
76
- minifyHTMLMinifier.default = minifyHTMLMinifier;
77
- var src_default = minifyHTMLMinifier;
78
- /*!
79
- * node-minify
80
- * Copyright(c) 2011-2024 Rodolphe Stoclin
81
- * MIT Licensed
82
- */
83
-
84
- // fix-cjs-exports
85
- if (module.exports.default) {
86
- Object.assign(module.exports.default, module.exports);
87
- module.exports = module.exports.default;
88
- delete module.exports.default;
89
- }
package/dist/index.d.cts DELETED
@@ -1,15 +0,0 @@
1
- import { MinifierOptions } from '@node-minify/types';
2
-
3
- /*!
4
- * node-minify
5
- * Copyright(c) 2011-2024 Rodolphe Stoclin
6
- * MIT Licensed
7
- */
8
-
9
- declare const minifyHTMLMinifier: {
10
- ({ settings, content, callback, index, }: MinifierOptions): string | void;
11
- default: any;
12
- };
13
-
14
- export { minifyHTMLMinifier as default };
15
- export = minifyHTMLMinifier