Remove core variant

This commit is contained in:
Wilson Lin 2022-06-21 21:52:28 +10:00
commit ec8c4e338a
21 changed files with 92 additions and 156 deletions

View file

@ -67,7 +67,7 @@ Check out the [docs](https://docs.rs/minify-html) for API and usage examples.
<details>
<summary><img width="24" src="https://wilsonl.in/minify-html/icon/nodejs.png"> <strong>Node.js</strong></summary>
- Package: [@minify-html/js](https://www.npmjs.com/package/@minify-html/js)
- Package: [@minify-html/node](https://www.npmjs.com/package/@minify-html/node)
- Binding: [N-API](https://nodejs.org/api/n-api.html)
- Platforms: Linux (ARM64 and x64), macOS (ARM64 and x64), Windows (x64); Node.js 8.6.0 and higher
@ -76,13 +76,13 @@ Check out the [docs](https://docs.rs/minify-html) for API and usage examples.
Using npm:
```bash
npm i @minify-html/js
npm i @minify-html/node
```
Using Yarn:
```bash
yarn add @minify-html/js
yarn add @minify-html/node
```
### Use
@ -90,8 +90,8 @@ yarn add @minify-html/js
TypeScript definitions are available.
```ts
import * as minifyHtml from "@minify-html/js";
// Or `const minifyHtml = require("@minify-html/js")` if not using TS/ESM.
import * as minifyHtml from "@minify-html/node";
// Or `const minifyHtml = require("@minify-html/node")` if not using TS/ESM.
const cfg = minifyHtml.createConfiguration({ keep_spaces_between_attributes: true, keep_comments: true });
const minified = minifyHtml.minify("<p> Hello, world! </p>", cfg);