# gulp-processhtml

> Process html files at build time to modify them as you wish

Latest version **1.2.0** (published 2017-12-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install gulp-processhtml
pnpm add gulp-processhtml
yarn add gulp-processhtml
bun add gulp-processhtml
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2017-12-30 |
| First published | 2014-01-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 77 |
| Author | Julien Castelain |
| Maintainers | wildhoney |
| Keywords | gulpplugin, htmlprocessor, process html, process, html, html processor |

## Links

- npm: https://www.npmjs.com/package/gulp-processhtml
- Repository: https://github.com/Wildhoney/gulp-processhtml
- Homepage: https://github.com/Wildhoney/gulp-processhtml#readme
- Issues: https://github.com/Wildhoney/gulp-processhtml/issues
- npm.io page: https://npm.io/package/gulp-processhtml

## Dependencies (3)

- [through2](https://npm.io/package/through2.md) latest
- [plugin-error](https://npm.io/package/plugin-error.md) ~0.1.2
- [htmlprocessor](https://npm.io/package/htmlprocessor.md) latest

## 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

- 1.2.0 (latest) — 2017-12-30
- 1.1.0 — 2015-03-05
- 1.0.8 — 2015-03-05
- 1.0.6 — 2015-03-05
- 1.0.5 — 2015-03-02
- 1.0.2 — 2014-09-25
- 1.0.1 — 2014-09-25
- 1.0.0 — 2014-09-25
- 0.0.6 — 2014-08-30
- 0.0.5 — 2014-08-21
- 0.0.4 — 2014-06-11
- 0.0.3 — 2014-03-08
- 0.0.2 — 2014-03-07
- 0.0.1 — 2014-01-11

## README

# gulp-processhtml

Gulp plugin uses Denis Ciccale's [node-htmlprocessor](https://github.com/dciccale/node-htmlprocessor)
to process/transform html files.

![Travis](http://img.shields.io/travis/Wildhoney/gulp-processhtml.svg?style=flat)
&nbsp;
![npm](http://img.shields.io/npm/v/gulp-processhtml.svg?style=flat)
&nbsp;
![License MIT](http://img.shields.io/badge/License-MIT-lightgrey.svg?style=flat)

* **npm:** `npm install gulp-processhtml --save-dev`

## Gulpfile

```js
var gulp = require('gulp'),
    processhtml = require('gulp-processhtml')
    opts = { /* plugin options */ };

gulp.task('default', function () {
    return gulp.src('./*.html')
               .pipe(processhtml(opts))
               .pipe(gulp.dest('dist'));
});
```

## Example Usage

You might need to change some attributes in your html, when you're releasing
for a different environment.

Using this plugin, you can transform this:

```html
<!DOCTYPE html>
<html>
<head>
  <!-- build:css style.min.css -->
  <link rel="stylesheet" href="css/style.css">
  <!-- /build -->
</head>
<body>

  <!-- build:js app.min.js -->
  <script src="app.js"></script>
  <!-- /build -->

  <!-- build:remove -->
  <script src="http://192.168.0.1:35729/livereload.js?snipver=1"></script>
  <!-- /build -->

  <!-- build:replace 'Goodbye Livereload...' -->
  <script src="http://192.168.0.1:35729/livereload.js?snipver=1"></script>
  <!-- /build -->

</body>
</html>
```

To this:

```html
<!DOCTYPE html>
<html>
<head>
  <link rel="stylesheet" href="style.min.css">
</head>
<body>
  <script src="app.min.js"></script>
  Goodbye Livereload...
</body>
</html>
```

## Credits

[Denis Ciccale](https://twitter.com/dciccale)

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