diff --git a/README.md b/README.md index bca5319..becb498 100644 --- a/README.md +++ b/README.md @@ -1 +1,47 @@ -# pnpm-license-exporter \ No newline at end of file +# pnpm-license-exporter + +![License](https://img.shields.io/npm/l/@luco-inc/pnpm-license-exporter?style=for-the-badge) +![Version](https://img.shields.io/npm/v/@luco-inc/pnpm-license-exporter?color=blue&label=Version&logo=npm&style=for-the-badge) + +Dependencies license exporter for projects using pnpm. + +Internally using the `pnpm licenses list` command to get the licenses of the dependencies. + + +## Requirements + +- Node.js 20.0.0 or higher (tested on 20.12.2, experimental support for 18.3.0 or higher) + - Internally using [`parseArgs`](https://nodejs.org/api/util.html#utilparseargsconfig) which is available since Node.js 18.3.0 +- pnpm 6.0.0 or higher (tested on 6.14.4) + - CAN NOT use yarn and npm + +## Usage + +```bash +pnpm install -D @luco-inc/pnpm-license-exporter + +pnpm-license-exporter [options] +``` + +or + +```bash +pnpm dlx @luco-inc/pnpm-license-exporter [options] +``` + + +## CLI Usage +Export only directly & production dependencies: `pnpm-license-exporter` +Export all production dependencies: `pnpm-license-exporter --recursive` <-- Recommended +Export all dependencies: `pnpm-license-exporter --recursive --dev` + +## Options +| Arg | Description | Type | Default | +|-----------------|----------------------------------|----------------|-----------------| +| -o, --output | Output folder for the exports. | [string] | ./licenses.json | +| -p, --pretty | Prettify the json output. | flag/[boolean] | false | +| -r, --recursive | Include all subDependencies | flag/[boolean] | false | +| -d, --dev | Include dev dependencies. | flag/[boolean] | false | +| --no-prod | Exclude production dependencies. | flag/[boolean] | false | +| --no-optional | Exclude optional dependencies. | flag/[boolean] | false | + diff --git a/package.json b/package.json index 6f656bd..4631834 100644 --- a/package.json +++ b/package.json @@ -50,5 +50,5 @@ "publishConfig": { "access": "public" }, - "packageManager": "pnpm@8.15.6+sha256.01c01eeb990e379b31ef19c03e9d06a14afa5250b82e81303f88721c99ff2e6f" + "packageManager": "pnpm@8.15.7+sha256.50783dd0fa303852de2dd1557cd4b9f07cb5b018154a6e76d0f40635d6cee019" }