列出已安装包的许可证。
yarn licenses list
运行这个命令将按字母顺序列出所有被 yarn 或 yarn install 安装的包,并且给你每个包关联的许可证(和源代码的 URL)。
1. yarn licenses list
1. yarn licenses v0.14.0
2. ├─ abab@1.0.3
3. │ ├─ License: ISC
4. │ └─ URL: git+https://github.com/jsdom/abab.git
5. ├─ abbrev@1.0.9
6. │ ├─ License: ISC
7. │ └─ URL: http://github.com/isaacs/abbrev-js
8. ├─ acorn-globals@1.0.9
9. │ ├─ License: MIT
10. │ └─ URL: https://github.com/ForbesLindesay/acorn-globals.git
11. ├─ acorn@2.7.0
12. │ ├─ License: MIT
13. │ └─ URL: https://github.com/ternjs/acorn.git
14. ├─ align-text@0.1.4
15. │ ├─ License: MIT
16. │ └─ URL: git://github.com/jonschlinkert/align-text.git
17. ├─ amdefine@1.0.0
18. │ ├─ License: BSD-3-Clause AND MIT
19. │ └─ URL: https://github.com/jrburke/amdefine.git
20. ├─ ansi-escapes@1.4.0
21. │ ├─ License: MIT
22. │ └─ URL: https://github.com/sindresorhus/ansi-escapes.git
23. ├─ ansi-regex@2.0.0
24. │ ├─ License: MIT
25. │ └─ URL: https://github.com/sindresorhus/ansi-regex.git
26. ...
yarn licenses generate-disclaimer
运行这个命令将返回一个从所有你安装的包得到的排序后的许可证列表,打印在 stdout。
1. yarn licenses generate-disclaimer
1. The following software may be included in this product: package-1. This software contains the following license and notice below:
3. [[LICENSE TEXT]]
5. -----
7. The following software may be included in this product: package-2. 本软件包含如下证书和注意事项:
9. [[LICENSE TEXT]]
