https://github.com/nesk/gulp-htmlprocessor
Process html files at build time to modify them depending on the release environment
https://github.com/nesk/gulp-htmlprocessor
Last synced: about 1 month ago
JSON representation
Process html files at build time to modify them depending on the release environment
- Host: GitHub
- URL: https://github.com/nesk/gulp-htmlprocessor
- Owner: nesk
- License: mit
- Created: 2014-09-08T14:27:06.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2014-12-05T19:40:28.000Z (over 11 years ago)
- Last Synced: 2025-10-28T08:31:58.361Z (8 months ago)
- Language: JavaScript
- Size: 184 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# gulp-htmlprocessor
> Process html files at build time to modify them depending on the release environment
This project is a [Gulp](http://gulpjs.com/) implementation of [node-htmlprocessor](https://github.com/dciccale/node-htmlprocessor), which is the standalone library __of the [grunt-processhtml](https://github.com/dciccale/grunt-processhtml) plugin__.
## Status
Currently, as of v0.3.3 __every features__ of grunt-processhtml __are supported__.
### Differences
The only difference between the Grunt plugin and this Gulp plugin is the environment option, it must be set manually due to the lack of target management in Gulp.
## Usage
Be sure to have the latest version of Gulp:
```shell
npm install -g gulp
```
Install the plugin with this command:
```shell
npm install --save-dev gulp-htmlprocessor
```
The options and the HTML syntax are listed [in the original documentation](https://github.com/dciccale/grunt-processhtml#readme).
Now, you can process your HTML in your `gulpfile.js`:
```js
var gulp = require('gulp'),
htmlprocessor = require('gulp-htmlprocessor');
var options = {
// Pass your options here
};
gulp.task('default', function() {
return gulp.src('src/*.html')
.pipe(htmlprocessor(options))
.pipe(gulp.dest('dist'));
});
```
## Test
To run the tests, just use the following command:
```shell
npm test
```