gulp-rename

gulp-rename is a gulp plugin to rename files easily.

Installation

npm install --save-dev gulp-rename

Configuration

rename via a fixed object

const rename = require("gulp-rename");

gulp.src("./src/main/text/hello.txt")
  .pipe(rename({
    dirname: "main/text/ciao",
    basename: "aloha",
    prefix: "bonjour-",
    suffix: "-hola",
    extname: ".md"
  }))
  .pipe(gulp.dest("./dist")); // ./dist/main/text/ciao/bonjour-aloha-hola.md