material-components-web-catalog
material-components-web-catalog copied to clipboard
Indicate version of MDC Web somewhere within the catalog
It may be useful for people to be able to be reminded at a glance of what version of MDC Web the catalog is demonstrating. We should be able to populate a single variable in constants.js
for this and display it somewhere. (Bottom of page? Right side of top app bar?)
Originally, I was hoping we could switch to depending on the roll-up package and scan that dependency to auto-generate this, but that's not feasible due to recursive node_modules
.
Ideally we should probably script a way to update all dependencies and the displayed version each time we want to upgrade the catalog to a new MDC Web release. Initially, the process of updating both package.json
and the displayed version will need to be manual.
@kfranqueiro Thoughts on getting it directly from the devDependencies
in package.json
? It seems like a straightforward way to have it update, but would also require use to keep the package.json
updated to the latest.
https://github.com/material-components/material-components-web-catalog/compare/feat/version?expand=1
If we really want it from the package-lock.json
, we could write a straightforward webpack script to parse out just what we need, since it's over 14k lines.
Yeah, I originally contemplated getting it from package.json...I was hoping we could depend on the overall material-components-web package to make this simple, but I think that may be infeasible because of how npm sometimes installs nested dependencies.
Maybe we can do something in constants.js
to pull out the latest tag seen out of all of the @material
deps? Or maybe we just make it standard practice to rev a constant at the same time we update our packages (and maybe we can script that).