Have ideas to improve npm?Join in the discussion! »

    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

    566

    Version

    1.0.1

    License

    MIT

    Last publish

    Collaborators

    • avatar