gulp-cached icon indicating copy to clipboard operation
gulp-cached copied to clipboard

cache destination name

Open tobsn opened this issue 7 years ago • 1 comments

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!

tobsn avatar Aug 16 '16 13:08 tobsn

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.

yocontra avatar Jan 08 '17 22:01 yocontra