Skip to content

Map function to allow custom manifest#33

Open
BigFax wants to merge 3 commits intoDragory:masterfrom
BigFax:master
Open

Map function to allow custom manifest#33
BigFax wants to merge 3 commits intoDragory:masterfrom
BigFax:master

Conversation

@BigFax
Copy link
Copy Markdown

@BigFax BigFax commented Mar 17, 2020

Hi, would be nice to have a function allowing custom manifest. This pull request, allows it.

Example :

return gulp.src([
  './base.css'
])
.pipe(hash({
  hashLength: 8,
  template: '<%= hash %><%= ext %>'
}))
.pipe(gulp.dest('./dist'))
.pipe(hash.manifest('./data/assets.json', {
  map: function (origPath, relative) {
    return [origPath, '/css/' + relative];
  }
}))
.pipe(gulp.dest('.'));

Will produce :
{"base.css":"/css/65c3ac6b.css"} instead of {"base.css":"65c3ac6b.css"}

I also change the way buffer is created in a second commit, but looks like this commit doesn't pass checks, could remove it if need it.

@BigFax BigFax closed this Apr 6, 2020
@BigFax BigFax reopened this Apr 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant