Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aminnairi/rollup-plugin-minify-html
https://github.com/aminnairi/rollup-plugin-minify-html
Last synced: about 5 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/aminnairi/rollup-plugin-minify-html
- Owner: aminnairi
- License: mit
- Created: 2019-05-04T09:04:14.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-03T08:18:52.000Z (almost 2 years ago)
- Last Synced: 2024-05-27T22:05:11.431Z (6 months ago)
- Language: TypeScript
- Size: 114 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rollup-plugin-minify-html
## Installation
```console
$ npm install rollup-plugin-minify-html
```## Usage
```javascript
import { minifyHtml } from 'rollup-plugin-minify-html';
```## Parameters
### Files
An array of objects. Eeach object defines the HTML file to minify and the minified HTML file's output path.
```javascript
minifyHtml({
files: [{
from: 'src/index.html',
to: 'dist/index.html'
}]
})
```### Options
An object defining the options for the HTML minification. See [`html-minifier`][html-minifier] for more informations.
```javascript
minifyHtml({
htmlMinifierOptions: {
collapseWhitespace: true
}
})
```## Examples
See the [`example`][example] folder.
[html-minifier]: https://github.com/kangax/html-minifier
[example]: ./example