Skip to content

Buggy options.base behaviour #11

@piotr-cz

Description

@piotr-cz

When specyfing options.base, it's usage is being over overriden by options.dest here because options.dest always contains a string.

This is a follow up for #3 (comment)
I came up with exactly similar hack, which worked for me, however it broke tests.

I was not able to setup rev-del as a gulp plugin for following file structure:

public/
    rev-manifest.json
    css/
         styles-497b00d23b.min.css

with the contents of rev-manifest.json:

{
  "css/styles.min.css": "css/styles-497b00d23b.min.css"
}

code I've used:

var pathBuild = './public';

gulp.src('./resources/assets/css/styles.css')
  // It's required to prepend subfolder so gulpRev uses it in manifest
  .pipe(gulpRename({dirname: 'css', basename: 'styles', 'suffix': '.min'}))
  .pipe(gulpRev())
  // Store compiled styles.min.css file
  .pipe(gulp.dist(pathBuild))
  // Configure manifest
  .pipe(gulpRev.manifest({
    path: pathBuild + '/rev-manifest.json'
    base: pathBuild
  }))
  // Clean previous versioned files
  .pipe(revDel({
    base: pathBuild
  }))
  .pipe(gulp.dest(pathBuild))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions