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

Add version in dist #89

Closed
JayPanoz opened this issue May 26, 2020 · 6 comments
Closed

Add version in dist #89

JayPanoz opened this issue May 26, 2020 · 6 comments
Labels
documentation low-hanging fruit Issues you can tackle as your first code contribution

Comments

@JayPanoz
Copy link
Collaborator

I'm submitting a feature request

Short description of the issue/suggestion:

Currently there is no version to be found for/in dist stylesheets while it would probably make it easier for implementers to know they are up to date.

@JayPanoz JayPanoz added documentation low-hanging fruit Issues you can tackle as your first code contribution labels May 26, 2020
@JayPanoz
Copy link
Collaborator Author

Could be useful to handle versioning only in one place, and by extension, a header with a plugin such as postcss-header – we could also start removing comments in dist stylesheets.

@JayPanoz
Copy link
Collaborator Author

JayPanoz commented Jun 2, 2020

@mickael-menu, @danielweck Question.

I just resolved this issue in develop: 0849bc4 and removed comments on the same occasion.

Would you like to at least keep headers of (sub-)modules to make it a little easier to debug, or maybe even have map files in dist (they are currently .gitignored so the only way to get them is to build ReadiumCSS)?

@mickael-menu
Copy link
Member

So far I didn't need to really debug inside Readium CSS itself, but the map files could be useful indeed. I have no opinion on the sub-modules headers, I guess it doesn't hurt to keep them.

@JayPanoz
Copy link
Collaborator Author

JayPanoz commented Jun 2, 2020

I have no opinion on the sub-modules headers, I guess it doesn't hurt to keep them.

That’s reasonable, esp. considering #51, but at the same time map files would have all comments and point directly to these modules.

Moreover, we’re not minifying ReadiumCSS stylesheets yet, and I guess it would be slightly better to do that eventually (as it’s pretty much a strong recommandation for web).

@danielweck
Copy link
Member

FWIW: in the Readium Desktop SDK (i.e. all r2-xxx-js) components, we build a special data structure (JSON) to encode a persistent representation of "versioning information".
Example with the streamer:
http://readium2.herokuapp.com/version/show
https://github.com/edrlab/r2-streamer-js-dist/blob/develop/dist/gitrev.json
As you can see the package.json version field is not preserved, instead the canonical version is the Git revision.

@danielweck
Copy link
Member

PS: here is the build script (crappy old, but has served us well over the years ;)

https://github.com/readium/r2-streamer-js/blob/develop/tools/gitrev.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation low-hanging fruit Issues you can tackle as your first code contribution
Projects
None yet
Development

No branches or pull requests

3 participants