gulp-rename npm package of node.js


Overview

This plugin is used to rename a file via string.

Code


													
//rename via string
var gulp = require('gulp');
var rename = require("gulp-rename");
gulp.task('default', function() {
	gulp.src("maps/main.css")
	.pipe(rename("css/gulp.min.css"))
	.pipe(gulp.dest("./destination"));   		// /destination/css/gulp.min.css
});

				
													
												

Run

  • Now run the snippet using the following command :
    													
    $ gulp