gulp-pathmap

Rename files with pathmap. Think of it like `sprintf` for paths.


Keywords
gulpplugin, gulp-plugin, pathmap, rename, filename, basename, extname, dirname
License
MIT
Install
npm install gulp-pathmap@0.1.0

Documentation

gulp-pathmap

Rename files with pathmap, rake's pathmap for JavaScript. Think of it like sprintf for paths.

NPM version Build Status

Usage

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 docs for all supported patterns.

License

MIT License