npm

Need private packages and team management tools?Check out npm Orgs. »

gulp-replace-name

1.0.1 • Public • Published

gulp-replace-name Build Status

To change file name.

Install

$ npm install gulp-replace-name --save-dev

Usage

var gulp = require('gulp');
var replaceName = require('gulp-replace-name');
 
// .js -> .min.js
gulp.task('replaceName', function() {
  return gulp.src('./**/*.js')
    .pipe(replaceName(/\.js/g, '.min.js'))
    .pipe(gulp.dest('./dist'));
});
 
 
// .js -> .json
gulp.task('replaceName', function() {
  return gulp.src('./**/*.js')
    .pipe(replaceName(/\.js/g, '.json'))
    .pipe(gulp.dest('./dist'));
});
 
 
// hello -> world
gulp.task('replaceName', function() {
  return gulp.src('./**/*.js')
    .pipe(replaceName(/hello/g, 'world'))
    .pipe(gulp.dest('./dist'));
});

Keywords

none

install

npm i gulp-replace-name

Downloadsweekly downloads

1,172

version

1.0.1

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability