Preprocess HTML with Hypher
Issues with the output should be reported on the Hypher issue tracker.
$ npm install --save-dev gulp-hypher
$ npm install --save-dev hyphenation.en-us
Replacing en-us with the relevant hyphenation pattern for your language.
var gulp = require('gulp');
var hypher = require('gulp-hypher');
var hypher_en_us = require('hyphenation.en-us');
gulp.task('default', function () {
return gulp.src('index.html')
.pipe(hypher(hypher_en_us))
.pipe(gulp.dest('dist'));
});
This will add soft hyphens to all text nodes in the HTML passed.