Skip to content

Commit

Permalink
Update readme (#35)
Browse files Browse the repository at this point in the history
* update README

* update pnpm
  • Loading branch information
NEKOYASAN authored Apr 15, 2024
1 parent b5234e5 commit ddb94e1
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 2 deletions.
48 changes: 47 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,47 @@
# pnpm-license-exporter
# 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 |

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,5 @@
"publishConfig": {
"access": "public"
},
"packageManager": "[email protected].6+sha256.01c01eeb990e379b31ef19c03e9d06a14afa5250b82e81303f88721c99ff2e6f"
"packageManager": "[email protected].7+sha256.50783dd0fa303852de2dd1557cd4b9f07cb5b018154a6e76d0f40635d6cee019"
}

0 comments on commit ddb94e1

Please sign in to comment.