0.0.2 • Published 10 years ago

gulp-entity-convert v0.0.2

Weekly downloads
99
License
MIT
Repository
github
Last release
10 years ago

gulp-entity-convert

Gulp wrapper for entity-convert. Converts Unicode characters to either HTML or CSS entities. Useful if your built files eventually go to a system that can't handle Unicode character sets.

Install

Install with npm

npm install --save-dev gulp-entity-convert

Example

var gulp = require('gulp');
var entityconvert = require('gulp-entity-convert');

gulp.task('default', function () {
	gulp.src('./src/**/*.html')
		.pipe(entityconvert())
		.pipe(gulp.dest('.build/'));
});

Options

By default, this plugin treats all input files as HTML and will convert characters to HTML entities. You can pass in an options object with the type property to specify either HTML or CSS, like so:

  .pipe(entityconvert({ type: 'css' }))

or if you want to be specific:

  .pipe(entityconvert({ type: 'html' }))

License

MIT