package-json-cli

Get the package.json of a package from the npm registry

Usage no npm install needed!

<script type="module">
  import packageJsonCli from 'https://cdn.skypack.dev/package-json-cli';
</script>

README

package-json-cli Build Status

Get the package.json of a package from the npm registry

Install

$ npm install --global package-json-cli

Usage

$ package-json --help

  Usage
    $ package-json <name> [version]

  Example
    $ package-json ava
    {
      "name": "ava",
      "version": "0.18.0"
      ...
    }

The version can be in any format supported by the semver module. For example:

  • 1 - get the latest 1.x.x
  • 1.2 - get the latest 1.2.x
  • ^1.2.3 - get the latest 1.x.x but at least 1.2.3

Related

License

MIT © Sindre Sorhus