Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Map function to allow custom manifest #33

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

BigFax
Copy link

@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