gulp-prettify
Prettify, format, beautify HTML.
Install
Install as a devDependency
with npm:
$ npm i gulp-prettify -D
Usage
var gulp = require('gulp');
var prettify = require('gulp-prettify');
gulp.task('prettify', function() {
gulp.src('src/*.html')
.pipe(prettify({indent_size: 2}))
.pipe(gulp.dest('dist'))
});
Other examples are in the example folder.
See the js-beautify docs for options.
Related projects
- gulp-dest: Gulp plugin for easily defining destination paths using path variables. | homepage
- gulp-extname: gulp plugin to dynamically rewrite dest extensions based on src extensions. | homepage
- gulp-htmlmin: gulp plugin to minify HTML. | homepage
Running tests
Install dev dependencies:
$ npm i -d && npm test
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Author
Jon Schlinkert
License
Copyright © 2015 Jon Schlinkert Released under the MIT license.
This file was generated by verb on December 27, 2015.