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

Auto versioning from file hash #5

Open
HarryBurns opened this issue Nov 23, 2015 · 7 comments
Open

Auto versioning from file hash #5

HarryBurns opened this issue Nov 23, 2015 · 7 comments

Comments

@HarryBurns
Copy link

Hello again!

RealFaviconGenerator provides versioning future. It makes links in HTML looks like:

<link rel="manifest" href="manifest.json?ver=416270658374">

In config:

//...
versioning: {
    paramName: "ver",
    paramValue: "416270658374"
}
//...

It would be great to have versioning: "auto" option, that will calculate ?ver=... automatically from file's hash.

This feature will be very handy :)

@HarryBurns
Copy link
Author

The gulp-hash plugin could help.

@haydenbleasel
Copy link

@HarryBurns According to the API docs:

When this section is set to true (ie. versioning: true), versioning is generated.

So just add versioning: true and it should be generated for you. If it doesn't work, then ask @phbernard haha. Piping to gulp-hash is also an option post-API-call but might be a hassle.

@HarryBurns
Copy link
Author

@haydenbleasel According to API docs:

When this section is set to true (ie. versioning: true), versioning is generated. The query parameter name is v and the value is a hashed timestamp.

I was talking about hash of file contents, not hashed timestamp :)

But, I think it would be better to move this issue to favicons. Cause RFG web-service is more about manual generation, whilst favicons is about CI and automation of build process.

@haydenbleasel
Copy link

@HarryBurns That is true. Typically I'd say use gulp-favicons and pipe it to gulp-hash but I don't think you can easily affect the metadata in this way, so it may have to be integrated. Let's move this to a new issue on Favicons.

@phbernard
Copy link
Contributor

Oh wow, I didn't see that one, sorry :(

This is already possible. Auto-everything:

//...
versioning: true
//...

Parameter name is TheVersion and auto-timestamp:

//...
versioning: {
    paramName: "TheVersion"
}
//...

@haydenbleasel
Copy link

@phbernard Yeah but he wants to hash by file contents rather than timestamp. Possible Feature Request for RFG.

@phbernard
Copy link
Contributor

Oh, right, thank of for pointing this out.

@phbernard phbernard reopened this Dec 11, 2015
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

3 participants