Created
February 16, 2017 14:49
-
-
Save antonreshetov/c41a13cfb878a3101196c3a62de81778 to your computer and use it in GitHub Desktop.
Gulp transliteration filename
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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