Skip to content

Instantly share code, notes, and snippets.

@antonreshetov
Created February 16, 2017 14:49
Show Gist options
  • Save antonreshetov/c41a13cfb878a3101196c3a62de81778 to your computer and use it in GitHub Desktop.
Save antonreshetov/c41a13cfb878a3101196c3a62de81778 to your computer and use it in GitHub Desktop.
Gulp transliteration filename
var gulp = require('gulp');
var rename = require("gulp-rename");
var translit = require('speakingurl');
gulp.task('translit', function () {
gulp.src("./*.*")
.pipe(rename(function(path){
var trl = translit(path.basename, {
lang: 'en'
})
path.basename = trl;
}))
.pipe(gulp.dest("./dist"));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment