https://github.com/chisel/ease-task-minify-html
HTML minifier for Ease task runner.
https://github.com/chisel/ease-task-minify-html
Last synced: 7 months ago
JSON representation
HTML minifier for Ease task runner.
- Host: GitHub
- URL: https://github.com/chisel/ease-task-minify-html
- Owner: chisel
- Created: 2019-06-30T02:43:12.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-05-09T21:08:52.000Z (almost 5 years ago)
- Last Synced: 2025-08-23T13:50:00.830Z (7 months ago)
- Language: JavaScript
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Ease Task Runner HTML Minifier Plugin
This is a plugin for the [Ease task runner](https://github.com/chisel/ease). It uses the [html-minifier](https://www.npmjs.com/package/html-minifier) module to minify HTML files.
# Installation
```
npm install ease-task-minify-html --save-dev
```
**easeconfig.js:**
```js
const minifyHtml = require('ease-task-minify-html');
module.exports = ease => {
ease.install('minify-html', minifyHtml, {});
};
```
# Configuration
This plugin takes a config object similar to [HTML Minifier Options](https://www.npmjs.com/package/html-minifier#options-quick-reference) while adding the following properties:
- `dir`: Path to a directory containing all the SASS files, relative to `easeconfig.js`
- `outDir`: Path to the output directory where the CSS files should be written, relative to `easeconfig.js`
- `cleanOutDir`: Boolean indicating if the output directory should be emptied first
# Example
**easeconfig.js:**
```js
const minifyHtml = require('ease-task-minify-html');
module.exports = ease => {
ease.install('minify-html', minifyHtml, {
dir: 'src',
outDir: 'dist',
collapseWhitespace: true
});
ease.job('minify-html-files', ['minify-html']);
};
```
**CLI:**
```
ease minify-html-files
```