gulp-entity-convert

0.0.2 • Public • Published

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

Package Sidebar

Install

npm i gulp-entity-convert

Weekly Downloads

79

Version

0.0.2

License

MIT

Last publish

Collaborators

  • louh