Skip to main content

License

License Screenshot

Introduction

The license option displays all listed licenses in a particular Node.js package, e.g.:

pkga license --package react --allow MIT

This command will list the licenses for the latest version of react.

Options

ArgumentDescription
--packagename and version of package e.g. react@17.0.2, will default to latest version if no version is provided
--folderpath to a local package.json on the filesystem
--typeWhich type of dependencies to traverse dependencies or
--allowDefine an allowlist that the licenses must fulfill
--groupedWill group licenses by their name

Example Usages

List licenses

pkga license --package react

Define an allowlist

pkga license --package react --allow MIT

Group licenses

pkga license --package react --grouped