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
Post a Comment