@node-minify/html-minifier 10.4.0 → 10.5.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/dist/index.d.ts +0 -20
- package/dist/index.d.ts.map +1 -1
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
//#region ../types/src/types.d.ts
|
|
2
|
-
|
|
3
2
|
/**
|
|
4
3
|
* Output result for multi-format image compression.
|
|
5
4
|
*/
|
|
@@ -8,7 +7,6 @@ type CompressorOutput = {
|
|
|
8
7
|
* Format of the output (e.g., 'webp', 'avif').
|
|
9
8
|
*/
|
|
10
9
|
format?: string;
|
|
11
|
-
|
|
12
10
|
/**
|
|
13
11
|
* Output content as string or Buffer.
|
|
14
12
|
*/
|
|
@@ -22,19 +20,16 @@ type CompressorResult = {
|
|
|
22
20
|
* Minified content as string (for text-based formats like JS, CSS, HTML, SVG).
|
|
23
21
|
*/
|
|
24
22
|
code: string;
|
|
25
|
-
|
|
26
23
|
/**
|
|
27
24
|
* Source map (for JS/CSS compressors).
|
|
28
25
|
*/
|
|
29
26
|
map?: string;
|
|
30
|
-
|
|
31
27
|
/**
|
|
32
28
|
* Minified content as Buffer (for binary formats like images).
|
|
33
29
|
* @example
|
|
34
30
|
* When using sharp for PNG/WebP compression
|
|
35
31
|
*/
|
|
36
32
|
buffer?: Buffer;
|
|
37
|
-
|
|
38
33
|
/**
|
|
39
34
|
* Multiple outputs for multi-format image compression.
|
|
40
35
|
* Used when converting to multiple formats simultaneously.
|
|
@@ -80,12 +75,10 @@ type Settings<TOptions extends CompressorOptions = CompressorOptions> = {
|
|
|
80
75
|
* The compressor function to use for minification.
|
|
81
76
|
*/
|
|
82
77
|
compressor: Compressor<TOptions>;
|
|
83
|
-
|
|
84
78
|
/**
|
|
85
79
|
* Optional label for the compressor (used in logging).
|
|
86
80
|
*/
|
|
87
81
|
compressorLabel?: string;
|
|
88
|
-
|
|
89
82
|
/**
|
|
90
83
|
* Content to minify (for in-memory minification).
|
|
91
84
|
* If provided, input/output are not required.
|
|
@@ -93,7 +86,6 @@ type Settings<TOptions extends CompressorOptions = CompressorOptions> = {
|
|
|
93
86
|
* For binary formats (images): Buffer (handled internally by image compressors)
|
|
94
87
|
*/
|
|
95
88
|
content?: string | Buffer;
|
|
96
|
-
|
|
97
89
|
/**
|
|
98
90
|
* Input file path(s) or glob pattern.
|
|
99
91
|
* Can be a single file, array of files, or wildcard pattern.
|
|
@@ -104,7 +96,6 @@ type Settings<TOptions extends CompressorOptions = CompressorOptions> = {
|
|
|
104
96
|
* - 'src/**\/*.js'
|
|
105
97
|
*/
|
|
106
98
|
input?: string | string[];
|
|
107
|
-
|
|
108
99
|
/**
|
|
109
100
|
* Output file path.
|
|
110
101
|
* Use $1 as placeholder for input filename in multi-file scenarios.
|
|
@@ -116,43 +107,36 @@ type Settings<TOptions extends CompressorOptions = CompressorOptions> = {
|
|
|
116
107
|
* - '$1.min.js' (creates app.min.js from app.js)
|
|
117
108
|
*/
|
|
118
109
|
output?: string | string[];
|
|
119
|
-
|
|
120
110
|
/**
|
|
121
111
|
* Compressor-specific options.
|
|
122
112
|
* See individual compressor documentation for available options.
|
|
123
113
|
*/
|
|
124
114
|
options?: TOptions;
|
|
125
|
-
|
|
126
115
|
/**
|
|
127
116
|
* CLI option string (used by CLI only).
|
|
128
117
|
* @internal
|
|
129
118
|
*/
|
|
130
119
|
option?: string;
|
|
131
|
-
|
|
132
120
|
/**
|
|
133
121
|
* Buffer size for file operations (in bytes).
|
|
134
122
|
* @default 1024000 (1MB)
|
|
135
123
|
*/
|
|
136
124
|
buffer?: number;
|
|
137
|
-
|
|
138
125
|
/**
|
|
139
126
|
* Timeout for the compressor process (in milliseconds).
|
|
140
127
|
* If execution exceeds this limit, the process will be killed.
|
|
141
128
|
*/
|
|
142
129
|
timeout?: number;
|
|
143
|
-
|
|
144
130
|
/**
|
|
145
131
|
* File type for compressors that support multiple types.
|
|
146
132
|
* Required for YUI compressor.
|
|
147
133
|
*/
|
|
148
134
|
type?: FileType;
|
|
149
|
-
|
|
150
135
|
/**
|
|
151
136
|
* Suppress console output.
|
|
152
137
|
* @default false
|
|
153
138
|
*/
|
|
154
139
|
silence?: boolean;
|
|
155
|
-
|
|
156
140
|
/**
|
|
157
141
|
* Public folder to prepend to input paths.
|
|
158
142
|
*
|
|
@@ -161,13 +145,11 @@ type Settings<TOptions extends CompressorOptions = CompressorOptions> = {
|
|
|
161
145
|
* the actual path becomes 'public/js/app.js'
|
|
162
146
|
*/
|
|
163
147
|
publicFolder?: string;
|
|
164
|
-
|
|
165
148
|
/**
|
|
166
149
|
* Replace files in place instead of creating new output files.
|
|
167
150
|
* @default false
|
|
168
151
|
*/
|
|
169
152
|
replaceInPlace?: boolean;
|
|
170
|
-
|
|
171
153
|
/**
|
|
172
154
|
* Allow empty output without throwing an error.
|
|
173
155
|
* When true, if minification results in empty content, the output file will not be written.
|
|
@@ -185,7 +167,6 @@ type MinifierOptions<TOptions extends CompressorOptions = CompressorOptions> = {
|
|
|
185
167
|
* The full settings object.
|
|
186
168
|
*/
|
|
187
169
|
settings: Settings<TOptions>;
|
|
188
|
-
|
|
189
170
|
/**
|
|
190
171
|
* The content to minify.
|
|
191
172
|
* For text-based formats (JS, CSS, HTML, SVG): string
|
|
@@ -193,7 +174,6 @@ type MinifierOptions<TOptions extends CompressorOptions = CompressorOptions> = {
|
|
|
193
174
|
* For multiple binary files: Buffer[]
|
|
194
175
|
*/
|
|
195
176
|
content?: string | Buffer | Buffer[];
|
|
196
|
-
|
|
197
177
|
/**
|
|
198
178
|
* Index of current file when processing multiple files.
|
|
199
179
|
*/
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":["CompressorReturnType","ImageFormat","CompressorOutput","Buffer","CompressorResult","CompressorOptions","Record","Compressor","TOptions","MinifierOptions","Promise","FileType","Settings","
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":["CompressorReturnType","ImageFormat","CompressorOutput","Buffer","format","content","CompressorResult","code","map","buffer","outputs","CompressorOptions","Record","Compressor","TOptions","MinifierOptions","Promise","args","FileType","Settings","compressor","compressorLabel","input","output","options","option","timeout","type","silence","publicFolder","replaceInPlace","allowEmptyOutput","settings","index","Result","size","sizeGzip","MinifyOptions"],"sources":["../../types/src/types.d.ts","../src/index.ts"],"mappings":";;AAkFA;;KArDYE,gBAAAA;EAqD4BS;;;EAjDpCP,MAAAA;EAkDqCY;;;EA7CrCX,OAAAA,WAAkBF,MAAAA;AAAAA;;;;KAMVG,gBAAAA;EAuCqCA;;;EAnC7CC,IAAAA;;;;EAKAC,GAAAA;EAsDgBM;;;;;EA/ChBL,MAAAA,GAASN,MAAAA;EAqHFe;;;;;;EA7GPR,OAAAA,GAAUR,gBAAAA;AAAAA;;;;;KAOFS,iBAAAA,GAAoBC,MAAAA;;;;;;KAOpBC,UAAAA,kBAA4BF,iBAAAA,GAAoBA,iBAAAA,KACvDM,IAAAA,EAAMF,eAAAA,CAAgBD,QAAAA,MAAcE,OAAAA,CAAQV,gBAAAA;;;;KAKrCY,QAAAA;;;;;;;;;;;;;;;;;;KAmBAC,QAAAA,kBAA0BR,iBAAAA,GAAoBA,iBAAAA;EAwH1BR;;;EApH5BiB,UAAAA,EAAYP,UAAAA,CAAWC,QAAAA;;;AC/E3B;EDoFIO,eAAAA;ECnFA;;;;;;ED2FAhB,OAAAA,YAAmBF,MAAAA;EC3FnB;;;;;;;;;EDsGAmB,KAAAA;;;;;;;;;;;EAYAC,MAAAA;;;;;EAMAC,OAAAA,GAAUV,QAAAA;;;;;EAMVW,MAAAA;;;;;EAMAhB,MAAAA;;;;;EAMAiB,OAAAA;;;;;EAMAC,IAAAA,GAAOT,QAAAA;;;;;EAMPU,OAAAA;;;;;;;;EASAC,YAAAA;;;;;EAMAC,cAAAA;;;;;;;EAQAC,gBAAAA;AAAAA;;;;;KAOQhB,eAAAA,kBACSJ,iBAAAA,GAAoBA,iBAAAA;;;;EAKrCqB,QAAAA,EAAUb,QAAAA,CAASL,QAAAA;;;;;;;EAQnBT,OAAAA,YAAmBF,MAAAA,GAASA,MAAAA;;;;EAK5B8B,KAAAA;AAAAA;;;;;;;AA5LJ;;;iBCZsB,YAAA,CAAA;EAClB,QAAA;EACA;AAAA,GACD,eAAA,GAAkB,OAAA,CAAQ,gBAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@node-minify/html-minifier",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.5.0",
|
|
4
4
|
"description": "html-minifier plugin for @node-minify",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"compressor",
|
|
@@ -52,10 +52,10 @@
|
|
|
52
52
|
"dev": "tsdown src/index.ts --watch"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@node-minify/utils": "10.
|
|
56
|
-
"html-minifier-next": "^4.
|
|
55
|
+
"@node-minify/utils": "10.5.0",
|
|
56
|
+
"html-minifier-next": "^4.19.1"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@node-minify/types": "10.
|
|
59
|
+
"@node-minify/types": "10.5.0"
|
|
60
60
|
}
|
|
61
61
|
}
|