@swc/html 0.0.11 → 0.0.13

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/lib/index.ts CHANGED
@@ -4,6 +4,10 @@ export async function minify(content: Buffer, options: any): Promise<string> {
4
4
  return binding.minify(content, toBuffer(options));
5
5
  }
6
6
 
7
+ export function minifySync(content: Buffer, options: any) {
8
+ return binding.minifySync(content, toBuffer(options));
9
+ }
10
+
7
11
  function toBuffer(t: any): Buffer {
8
12
  return Buffer.from(JSON.stringify(t));
9
13
  }
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@swc/html",
3
- "version": "0.0.11",
3
+ "version": "0.0.13",
4
4
  "description": "Super-fast alternative for posthtml",
5
5
  "homepage": "https://swc.rs",
6
- "main": "./index.js",
6
+ "main": "./lib/index.js",
7
7
  "author": "강동윤 <kdy1997.dev@gmail.com>",
8
8
  "license": "Apache-2.0",
9
9
  "keywords": [
@@ -54,18 +54,18 @@
54
54
  "version": "napi version -p scripts/npm"
55
55
  },
56
56
  "optionalDependencies": {
57
- "@swc/html-win32-x64-msvc": "0.0.11",
58
- "@swc/html-darwin-x64": "0.0.11",
59
- "@swc/html-linux-x64-gnu": "0.0.11",
60
- "@swc/html-linux-x64-musl": "0.0.11",
61
- "@swc/html-freebsd-x64": "0.0.11",
62
- "@swc/html-win32-ia32-msvc": "0.0.11",
63
- "@swc/html-linux-arm64-gnu": "0.0.11",
64
- "@swc/html-linux-arm-gnueabihf": "0.0.11",
65
- "@swc/html-darwin-arm64": "0.0.11",
66
- "@swc/html-android-arm64": "0.0.11",
67
- "@swc/html-linux-arm64-musl": "0.0.11",
68
- "@swc/html-win32-arm64-msvc": "0.0.11",
69
- "@swc/html-android-arm-eabi": "0.0.11"
57
+ "@swc/html-win32-x64-msvc": "0.0.13",
58
+ "@swc/html-darwin-x64": "0.0.13",
59
+ "@swc/html-linux-x64-gnu": "0.0.13",
60
+ "@swc/html-linux-x64-musl": "0.0.13",
61
+ "@swc/html-freebsd-x64": "0.0.13",
62
+ "@swc/html-win32-ia32-msvc": "0.0.13",
63
+ "@swc/html-linux-arm64-gnu": "0.0.13",
64
+ "@swc/html-linux-arm-gnueabihf": "0.0.13",
65
+ "@swc/html-darwin-arm64": "0.0.13",
66
+ "@swc/html-android-arm64": "0.0.13",
67
+ "@swc/html-linux-arm64-musl": "0.0.13",
68
+ "@swc/html-win32-arm64-msvc": "0.0.13",
69
+ "@swc/html-android-arm-eabi": "0.0.13"
70
70
  }
71
71
  }
package/lib/index.js DELETED
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.minify = void 0;
4
- const binding = require("./binding");
5
- async function minify(content, options) {
6
- return binding.minify(content, toBuffer(options));
7
- }
8
- exports.minify = minify;
9
- function toBuffer(t) {
10
- return Buffer.from(JSON.stringify(t));
11
- }