gulp rename file in same directory -


i'm trying minify , create copy without "src." part of every index.src.php file inside folder still have index.src.php available minified copy index.php:

gulp.task('usemin', function() {     return gulp.src('./**/index.src.php')         .pipe(usemin({             inlinecss: [ minifycss, 'concat' ]         }))         .pipe(rename(function(path){             path.basename = path.basename.replace('min\.', '');         }))         .pipe(gulp.dest('.')); }); 

... far literally renames index.src.php index.php

gulp-rename easier expected...

gulp.task('usemin', function() {     return gulp.src('./**/index.src.php')         .pipe(usemin({             inlinecss: [ minifycss, 'concat' ]         }))         .pipe(rename({             basename: 'index'         }))         .pipe(gulp.dest('.')); }); 

Comments

Popular posts from this blog

matlab - error with cyclic autocorrelation function -

django - (fields.E300) Field defines a relation with model 'AbstractEmailUser' which is either not installed, or is abstract -

c# - What is a good .Net RefEdit control to use with ExcelDna? -