Skip to content

free6k/gulp-converter-character-entities

Repository files navigation

gulp-converter-character-entities

Plugin for convert character entities (html, xml & etc)

Support entities:

Example work:

for example html2xml:

  -> #&160;
< -> <

Install

$ npm install --save-dev gulp-converter-character-entities

Usage

var gulp = require('gulp');
var cce = require('gulp-converter-character-entities');
var my_entity = cce.entities.html2xml;

gulp.task('cmu', function () {
	return gulp.src('src/file.html')
		.pipe(cce.convert({entity: my_entity}))
		.pipe(gulp.dest('dist'));
});

or with Jade

var gulp = require('gulp');
var jade = require('jade');
var cce = require('gulp-converter-character-entities');
var my_entity = cce.entities.html2xml;

gulp.task('cmu', function () {
	return gulp.src('src/file.jade')
		.pipe(jade())
		.pipe(cce.convert({entity: my_entity}))
		.pipe(gulp.dest('dist'));
});

Easy to expand

var my_entity - simple json

{
 "key": "value",
 " ": " "
}

License

MIT © free6k

About

Plugin for convert character entities (html, xml & etc)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published