@swc/html 1.11.13 → 1.11.15
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/index.d.ts +1 -1
- package/index.js +1 -1
- package/index.ts +11 -11
- package/package.json +11 -11
package/index.d.ts
CHANGED
|
@@ -46,4 +46,4 @@ export type FragmentOptions = Options & {
|
|
|
46
46
|
export declare function minify(content: string | Buffer, options?: Options): Promise<binding.TransformOutput>;
|
|
47
47
|
export declare function minifyFragment(content: string | Buffer, options?: FragmentOptions): Promise<binding.TransformOutput>;
|
|
48
48
|
export declare function minifySync(content: string | Buffer, options?: Options): binding.TransformOutput;
|
|
49
|
-
export declare function minifyFragmentSync(content: string | Buffer, options?: FragmentOptions):
|
|
49
|
+
export declare function minifyFragmentSync(content: string | Buffer, options?: FragmentOptions): binding.TransformOutput;
|
package/index.js
CHANGED
|
@@ -37,7 +37,7 @@ async function minifyFragment(content, options) {
|
|
|
37
37
|
function minifySync(content, options) {
|
|
38
38
|
return binding.minifySync(content, toBuffer(options !== null && options !== void 0 ? options : {}));
|
|
39
39
|
}
|
|
40
|
-
|
|
40
|
+
function minifyFragmentSync(content, options) {
|
|
41
41
|
return binding.minifyFragmentSync(content, toBuffer(options !== null && options !== void 0 ? options : {}));
|
|
42
42
|
}
|
|
43
43
|
function toBuffer(t) {
|
package/index.ts
CHANGED
|
@@ -8,12 +8,12 @@ export type Options = {
|
|
|
8
8
|
scriptingEnabled?: boolean;
|
|
9
9
|
forceSetHtml5Doctype?: boolean;
|
|
10
10
|
collapseWhitespaces?:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
| "none"
|
|
12
|
+
| "all"
|
|
13
|
+
| "smart"
|
|
14
|
+
| "conservative"
|
|
15
|
+
| "advanced-conservative"
|
|
16
|
+
| "only-metadata";
|
|
17
17
|
removeEmptyMetadataElements?: boolean;
|
|
18
18
|
removeComments?: boolean;
|
|
19
19
|
preserveComments?: string[];
|
|
@@ -26,9 +26,9 @@ export type Options = {
|
|
|
26
26
|
// TODO improve me after typing `@swc/css`
|
|
27
27
|
minifyJs?: boolean | { parser?: any; minifier?: any; codegen?: any };
|
|
28
28
|
minifyCss?:
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
| boolean
|
|
30
|
+
| { lib: "lightningcss" }
|
|
31
|
+
| { lib: "swc"; parser?: any; minifier?: any; codegen?: any };
|
|
32
32
|
minifyAdditionalScriptsContent?: [string, MinifierType][];
|
|
33
33
|
minifyAdditionalAttributes?: [string, MinifierType][];
|
|
34
34
|
sortSpaceSeparatedAttributeValues?: boolean;
|
|
@@ -65,10 +65,10 @@ export function minifySync(
|
|
|
65
65
|
return binding.minifySync(content, toBuffer(options ?? {}));
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
export
|
|
68
|
+
export function minifyFragmentSync(
|
|
69
69
|
content: string | Buffer,
|
|
70
70
|
options?: FragmentOptions
|
|
71
|
-
):
|
|
71
|
+
): binding.TransformOutput {
|
|
72
72
|
return binding.minifyFragmentSync(content, toBuffer(options ?? {}));
|
|
73
73
|
}
|
|
74
74
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swc/html",
|
|
3
|
-
"version": "1.11.
|
|
3
|
+
"version": "1.11.15",
|
|
4
4
|
"description": "Super-fast HTML minifier",
|
|
5
5
|
"homepage": "https://swc.rs",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -57,15 +57,15 @@
|
|
|
57
57
|
"@swc/counter": "^0.1.3"
|
|
58
58
|
},
|
|
59
59
|
"optionalDependencies": {
|
|
60
|
-
"@swc/html-darwin-x64": "1.11.
|
|
61
|
-
"@swc/html-win32-x64-msvc": "1.11.
|
|
62
|
-
"@swc/html-linux-x64-gnu": "1.11.
|
|
63
|
-
"@swc/html-linux-x64-musl": "1.11.
|
|
64
|
-
"@swc/html-win32-ia32-msvc": "1.11.
|
|
65
|
-
"@swc/html-linux-arm-gnueabihf": "1.11.
|
|
66
|
-
"@swc/html-darwin-arm64": "1.11.
|
|
67
|
-
"@swc/html-linux-arm64-gnu": "1.11.
|
|
68
|
-
"@swc/html-linux-arm64-musl": "1.11.
|
|
69
|
-
"@swc/html-win32-arm64-msvc": "1.11.
|
|
60
|
+
"@swc/html-darwin-x64": "1.11.15",
|
|
61
|
+
"@swc/html-win32-x64-msvc": "1.11.15",
|
|
62
|
+
"@swc/html-linux-x64-gnu": "1.11.15",
|
|
63
|
+
"@swc/html-linux-x64-musl": "1.11.15",
|
|
64
|
+
"@swc/html-win32-ia32-msvc": "1.11.15",
|
|
65
|
+
"@swc/html-linux-arm-gnueabihf": "1.11.15",
|
|
66
|
+
"@swc/html-darwin-arm64": "1.11.15",
|
|
67
|
+
"@swc/html-linux-arm64-gnu": "1.11.15",
|
|
68
|
+
"@swc/html-linux-arm64-musl": "1.11.15",
|
|
69
|
+
"@swc/html-win32-arm64-msvc": "1.11.15"
|
|
70
70
|
}
|
|
71
71
|
}
|