Need a `flow-typed install` CLI command
See original GitHub issueWe need some kind of baseline command that can be used to just explicitly find + install a library definition for a given “package@version” and flow version. Something like flow-typed --flowVersion=0.22 underscore@1.0.0
.
It’s pretty easy to add new commands to the CLI – check out the other PRs (https://github.com/flowtype/flow-typed/pull/15, https://github.com/flowtype/flow-typed/pull/23) that do this as an example.
For matching a package@version to a libdef in the repository: I’ve actually already written getMatchingLibdefs()
inside npm/src/commands/libdefsForPkg.js
over in https://github.com/flowtype/flow-typed/pull/23 . Given that that PR might warrant more discussion before it’s ready to land, it seems fine to just steal that code and put it somewhere general for re-use (which I would then be happy to rebase #23 on top of if this lands first).
Other than that, this command would just create a directory called flow-typed
and download/install the appropriate library definitions into it.
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (9 by maintainers)
Top GitHub Comments
Checkpoint! @splodingsocks’s Flow PR for the aforementioned integration landed: https://github.com/facebook/flow/pull/1640
Landed in: https://github.com/flowtype/flow-typed/pull/78