gulp-cached
gulp-cached copied to clipboard
cache destination name
gulp.task('indexfiles', function() {
return gulp.src('./**/index.src.php')
.pipe(inlinesource())
.pipe(usemin({
inlinecss: [ minifyCss, 'concat' ],
inlinejs: [uglify(), 'concat']
}))
.pipe(cache('index'))
.pipe(gulpif(
(process.env.ENV !== 'development'),
replace('"/assets/', '"https://cdn/assets/')
))
.pipe(rename({
basename: 'index'
}))
.pipe(gulp.dest('.'));
});
Is there any way of telling the module that the outcome will be "index.php" because of the rename? My source files are in the same directory as the output - source is index.src.php and output is index.php
Thanks!
Not sure I understand the issue, could you elaborate or provide a smaller more focused code sample? The cache should be placed before any transformations so they only get executed when the file changes.