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

help manifest format

Open quasiperfect opened this issue 4 years ago • 0 comments

hi

can anyone please give me a hand in how i can keep the filenames unchanged and get the manifest.js to this format

{
  "file.ext": "hash",
}

for now i have

{
  "D:/laragon/www/gulp/gutenberg.css": "D:/laragon/www/gulp/eaa6d87719",
  "D:/laragon/www/gulp/main.css": "D:/laragon/www/gulp/19c0c0e257"
}

using

gulp.task("revision", () =>
  gulp
    .src([config.theme.assetsDestPath + "**/*.{css,js}"])
    .pipe(rev())
    .pipe(through.obj(function (file, enc, cb) {
      file.path = file.revHash;
      cb(null, file);
    }))
    .pipe(rev.manifest({ merge: true }))
    .pipe(gulp.dest(config.theme.path))
);

quasiperfect avatar Mar 15 '21 08:03 quasiperfect