0.1.1 • Published 2 years ago

@jordinateur/gulp-he v0.1.1

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

gulp-he

For encoding or decoding HTML entities in your markup.

Encode

gulp.task('encode', function() {
  return gulp.src('./file-entities.html')
    .pipe(entities('encode', opts))
    .pipe(rename('encoded.html'))
    .pipe(gulp.dest('./output/'));
});

Methods

  • encode — encodes, replacing characters to its entity representations.
  • opts — pass all possible he options

Decode

gulp.task('decode', function() {
  return gulp.src('./input/with-entities.html')
    .pipe(entities('decode'))
    .pipe(rename('decoded.html'))
    .pipe(gulp.dest('./output'));
});

Methods

  • decode — decodes, replacing entities to characters.
  • opts — pass all possible he options

Credits

This repository is largerly inspired by gulp-html-entites and wouldn't exist without he