Closed ghost closed 10 years ago
Thanks ! The first bit is definitely a bug, which is a trivial fix. It would be nice to expose the version number in dry runs, definitely.
All the versioning is dealt with in the pulldown-resolver, so it's a question of how we'd get that info back into the CLI. Can't be too tricky to do - could do with @phuu's input on that.
@nallenscott thanks for your report - I have fixed the initial bug and will be pushing a new version of Pulldown that makes pulldown -v
work.
@jackfranklin thanks for the quick response! Looking forward to @phuu's feedback on the library version option.
@nallenscott no problem! I'd just need to chat to @phuu about how we can expose the version number and propagate it through and back out to the CLI, as we don't do that currently.
@phuu did you ever get a chance to look at the above comment? :)
Hey @jackfranklin & @nallenscott – sorry, never saw this. Could you explain what you mean a bit more? I don't quite understand! Sorry :)
I think the idea is that it would be nice if this worked (or something similar), to get the latest version of a particular library:
pulldown jquery -v
I thought that this would be really quite tricky, because version numbers are dealt with in the resolver...
But doing a dry run does give the version number, albeit hidden within the URL:
$ pulldown jquery -d
-> https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js
So we could make pulldown jquery -v
work by doing a dry run and parsing out the URL to get the version.
However, @nallenscott I'd be interested to hear your use case, as I've never personally had a need for it.
Cools. I think we should parse the URL, cos all of pulldown after the cdnjs module deals entirely in URLs.
Yeah I'm +1 for that.
@jackfranklin One traditionally uses "-v" for getting the current version of something, but isn't "-v" typically used for assets that are already installed? Perhaps "-v" isn't the right tool. Also, doing a dry run does reveal the version number, and after a few weeks of use, I'm not sure that duplicating the version number elsewhere would truly help.
I think we're ok to close this for now – although it wouldn't be too hard to implement, I think the use case is rare enough. Happy to reopen later.
Getting the current pulldown version requires passing a null for the identifier:
$ pulldown null -v
...which should be as easy as:
$ pulldown -v
It might also be more intuitive to get the latest version of a library, using:
$ pulldown jquery -v
...versus executing a dry run, which returns the version number buried in a URL:
$ pulldown jquery -d
-> https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js ...