Issue in rev-manifest.json file path

293 views Asked by At

I am using gulp-rev and it is working fine. But I have one issue. I have multiple gulp task and I want to keep track of all in rev-mainfest.json file so I am providing merge:true config in rev.manifest() but it is not creating the file on the path I am providing but at the root level of directory. Here is how I am providing the path:

        .pipe(rev())
        .pipe(gulp.dest('scripts/bundles/'))
        .pipe(rev.manifest({
            base: 'scripts/revisions/',
            merge: true
        }))
        .pipe(gulp.dest('scripts/revisions/'));

What am I missing here?

1

There are 1 answers

0
Kamil Dzielinski On

Specify the first argument to rev.manifest([path], [options]), like so:

.pipe(rev())
.pipe(gulp.dest('scripts/bundles/'))
.pipe(rev.manifest(
    'scripts/revisions/rev-manifest.json',
    {
        base: 'scripts/revisions/',
        merge: true
    }
))
.pipe(gulp.dest('scripts/revisions/'));