hparra / gulp-rename

Rename files easily
MIT License
692 stars 73 forks source link

Source files not deleted #34

Closed DavidOliver closed 9 years ago

DavidOliver commented 9 years ago

Hi. I'm probably doing something wrong, but I'm finding the source files are not being deleted and that I end up with both the original and newly-named files.

I'm trying to rename a directory of .svg files to .tpl.

gulp.task('svg-rename', ['svg-min'], function() {
    return gulp.src('app/View/Elements/graphics/*.svg', { base: process.cwd() })
        .pipe(rename({
            extname: ".tpl"
        }))
        .pipe(gulp.dest('.'));
});

I'm using 1.2.0, and I have write permissions for the files in question. Thanks.

shinnn commented 9 years ago

probably doing something wrong

Yes, gulp-rename doesn't delete the source files. vinyl-paths and this official doc help you if you want gulp to work as you expected.

DavidOliver commented 9 years ago

Many thanks. Sorry for posting a non-issue here.

shinnn commented 9 years ago

No problem :)