# browserify-html

> Makes HTML files usuable as modules in Browserify

Latest version **0.0.1** (published 2018-02-27) · ISC license · 0 weekly downloads

## Install

```sh
npm install browserify-html
pnpm add browserify-html
yarn add browserify-html
bun add browserify-html
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2018-02-27 |
| First published | 2018-02-27 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6 |
| Dependencies | 2 |
| Unpacked size | 3.1 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | bukas |
| Maintainers | bukas |
| Keywords | browserify, html, transform, browserify-transform |

## Links

- npm: https://www.npmjs.com/package/browserify-html
- Repository: https://github.com/huanz/browserify-html
- Homepage: https://github.com/huanz/browserify-html#readme
- Issues: https://github.com/huanz/browserify-html/issues
- npm.io page: https://npm.io/package/browserify-html

## Dependencies (2)

- [through](https://npm.io/package/through.md) ^2.3.8
- [html-minifier](https://npm.io/package/html-minifier.md) ^3.5.9

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 0.0.1 (latest) — 2018-02-27

## README

# browserify-html [![browserify-html](https://img.shields.io/npm/v/browserify-html.svg?style=flat-square)](https://www.npmjs.com/package/browserify-html)

Simple HTML transform for Browserify

```bash
npm i browserify-html
```

## Options

- exts - default: `['html', 'tpl']`
- minify - default: `{removeComments: true, collapseWhitespace: true, collapseBooleanAttributes: true, removeRedundantAttributes: true, removeEmptyAttributes: true}`, see [html-minifier](https://github.com/kangax/html-minifier#options-quick-reference)

## Usage

```javascript
const html = require('browserify-html');
```

### Browserify Middleware

```javascript
const bunlde = browserify()
    .transform(html, {
        exts: ['html', 'tpl'], // default
        minify: { // html-minifier options, see more: https://github.com/kangax/html-minifier#options-quick-reference
            removeComments: true,
            collapseWhitespace: true,
            collapseBooleanAttributes: true,
            removeRedundantAttributes: true,
            removeEmptyAttributes: true
        }
    });
```

### Gulp and Browserify

```javascript
gulp.task('js', () => {
    return gulp.src('./src/js/app.js')
        .pipe(browserify({
            transform: html
        }))
        .pipe(gulp.dest('./dist/js'));
});
```

---
_Source: https://npm.io/package/browserify-html · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
