Rename files with pathmap. Think of it like `sprintf` for paths.
npm install gulp-pathmapRename files with [pathmap][pathmap], rake's pathmap for JavaScript. Think of it like sprintf for paths.
`` js
var gulp = require('gulp');
var pathmap = require('pathmap');
// Renames all files according to the pathspec.
// In this example, the %X token is replaced with the file's
// path up to but not including the extension.
gulp.task('rename', function(){
return gulp.src('lib/*.js')
.pipe(pathmap('%X.min.js'))
.pipe(gulp.dest('build'));
});
``
See the [pathmap][pathmap] docs for all supported patterns.
[MIT License][LICENSE]
[pathmap]: https://github.com/jeremyruppel/pathmap
[LICENSE]: https://github.com/jeremyruppel/gulp-pathmap/blob/master/LICENSE