node-module-license-output 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -18
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
# Third-Party License Output for node_modules
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
[](https://www.npmjs.com/package/@myooken/license-output)
|
|
5
|
-
[](https://www.npmjs.com/package/@myooken/license-output)
|
|
6
|
-
|
|
7
|
-
https://www.npmjs.com/package/@myooken/license-output
|
|
3
|
+
https://www.npmjs.com/package/node-module-license-output
|
|
8
4
|
|
|
9
5
|
### What is this?
|
|
10
6
|
|
|
@@ -25,33 +21,33 @@ CLI command: `third-party-license`
|
|
|
25
21
|
#### Run without installing (recommended)
|
|
26
22
|
|
|
27
23
|
```bash
|
|
28
|
-
npx --package
|
|
24
|
+
npx --package=node-module-license-output -- third-party-license
|
|
29
25
|
```
|
|
30
26
|
|
|
31
27
|
#### Run via npm exec
|
|
32
28
|
|
|
33
29
|
```bash
|
|
34
|
-
npm exec --package
|
|
30
|
+
npm exec --package=node-module-license-output -- third-party-license
|
|
35
31
|
```
|
|
36
32
|
|
|
37
33
|
#### Install globally
|
|
38
34
|
|
|
39
35
|
```bash
|
|
40
|
-
npm i -g
|
|
36
|
+
npm i -g node-module-license-output
|
|
41
37
|
third-party-license
|
|
42
38
|
```
|
|
43
39
|
|
|
44
40
|
### Options
|
|
45
41
|
|
|
46
|
-
| Option | Description
|
|
47
|
-
| ---------------------- |
|
|
48
|
-
| `--node-modules <dir>` | Path to `node_modules`
|
|
49
|
-
| `--review [file]` | Write review file only; optional filename
|
|
50
|
-
| `--license [file]` | Write main file only; optional filename
|
|
51
|
-
| `--recreate` | Regenerate files from current `node_modules` only (drops removed packages)
|
|
52
|
-
| `--update` | Merge with existing outputs, keep removed packages, and mark their presence
|
|
53
|
-
| `--fail-on-missing` | Exit with code 1 if LICENSE/NOTICE/COPYRIGHT/THIRD-PARTY-NOTICES/THIRD-PARTY-LICENSES/ThirdPartyNoticeText/ThirdPartyText/COPYING are missing
|
|
54
|
-
| `-h`, `--help` | Show help
|
|
42
|
+
| Option | Description | Default |
|
|
43
|
+
| ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------- |
|
|
44
|
+
| `--node-modules <dir>` | Path to `node_modules` | `node_modules` |
|
|
45
|
+
| `--review [file]` | Write review file only; optional filename | `THIRD-PARTY-LICENSE-REVIEW.md` |
|
|
46
|
+
| `--license [file]` | Write main file only; optional filename | `THIRD-PARTY-LICENSE.md` |
|
|
47
|
+
| `--recreate` | Regenerate files from current `node_modules` only (drops removed packages) | `true` (default) |
|
|
48
|
+
| `--update` | Merge with existing outputs, keep removed packages, and mark their presence | `false` |
|
|
49
|
+
| `--fail-on-missing` | Exit with code 1 if LICENSE/NOTICE/COPYRIGHT/THIRD-PARTY-NOTICES/THIRD-PARTY-LICENSES/ThirdPartyNoticeText/ThirdPartyText/COPYING are missing | `false` |
|
|
50
|
+
| `-h`, `--help` | Show help | - |
|
|
55
51
|
|
|
56
52
|
> If neither `--review` nor `--license` is specified, **both files are generated**.
|
|
57
53
|
> Packages in both files are sorted by name@version; `--update` keeps entries for packages no longer in `node_modules` and annotates their usage status.
|
|
@@ -83,7 +79,7 @@ third-party-license --fail-on-missing
|
|
|
83
79
|
### Programmatic API
|
|
84
80
|
|
|
85
81
|
```js
|
|
86
|
-
import { collectThirdPartyLicenses } from "
|
|
82
|
+
import { collectThirdPartyLicenses } from "node-module-license-output";
|
|
87
83
|
|
|
88
84
|
const result = await collectThirdPartyLicenses({
|
|
89
85
|
nodeModules: "./node_modules",
|