gulp plugin for rename the basename, extension or suffix of files.
install:
npm add -D xren
options:
rename({
basename?: string | undefined // new file name
extname?: string | undefined // new file extersion
suffix?: string | undefined // new file suffix
})
sample:
// import modules
import { src, dest } from "gulp";
import postcss from "gulp-postcss";
import cssnano from "cssnano";
import rename from "xren";
// styles task
function styles() {
return src(["src/tiny.css"])
.pipe(postcss([cssnano({ preset: "default", comments: false })]))
.pipe(rename({ basename: "main", suffix: ".min", extname: ".css" }))
.pipe(dest("dist"));
}
// export
export { styles };MIT License. ©2025 pasmurno by llcawc. Made with ❤ to beautiful architecture