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

Merge manifest instead of overwrite #65

Open
farism opened this issue Jan 23, 2015 · 9 comments
Open

Merge manifest instead of overwrite #65

farism opened this issue Jan 23, 2015 · 9 comments

Comments

@farism
Copy link

farism commented Jan 23, 2015

gulp-rev recently merged some PR's that added support for merging into a manifest file rather than overwriting it completely. This would allow you to rev-all on an entire tmp folder, and use plugins like gulp-changed and gulp-cached to only rev changed files, and only write the changed files to the manifest. There may be a workaround using gulp-remember but I have yet to figure it out.

would this be in scope for gulp-rev-all?

@circlingthesun
Copy link
Contributor

The problem with this is that even if a file did not change, it might
reference a file that did. It would therefore need to update the reference
which will result in a different hash.

On Fri, 23 Jan 2015 11:47 pm farism [email protected] wrote:

gulp-rev recently merged some PR's that added support for merging into a
manifest file rather than overwriting it completely. This allows you to
rev-all on an entire tmp folder, and use plugins like gulp-changed and
gulp-cached to only rev changed files, and only write the changed files to
the manifest. There may be a workaround using gulp-remember but I have yet
to figure it out.

would this be in scope for gulp-rev-all?


Reply to this email directly or view it on GitHub
#65.

@farism
Copy link
Author

farism commented Jan 23, 2015

That's a good point. But you could also use gulp-changed or some other caching mechanism further down in the pipeline (after rev, but before generating the manifest) to only write files to disk that have actually changed after being rev'd.

I suppose a user may implement it incorrectly (like in my original use case), but allowing a merge on the manifest means multiple sets of rev'd files could all be in the same manifest. Sure, a user is probably recommended to glob * and rev them all at the same time to make sure that all references are taken care of, but there are times when you only want to rev a subset of files and update the manifest accordingly.

@shaneparsons
Copy link

+1 for the ability to append to a manifest rather than re-writing it.

@tigranpetrossian
Copy link

@farism off topic: I'd really appreciate if you could explain on how gulp-rev's merge option helps with gulp-changed.

@Briareos
Copy link

+1 to this.

We're working on a complex app and would like to use it with PHP scripts. Managing a single rev-manifest file would be easier.

@jonathan-soifer
Copy link

👍

@phyng
Copy link

phyng commented Jan 9, 2016

👍

Finally I find a trick way to do that, It works for me.

var revAll = new RevAll();
revAll.revisioner.manifest = require('./old-manifest.json');

https://github.com/smysnk/gulp-rev-all/blob/master/revisioner.js#L35

@lalitkapoor
Copy link

+1

@manuelbieh
Copy link

This does not longer work in 0.9.x - how can I achieve this in the recent version?

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

No branches or pull requests

9 participants