tree: 33d6beb12f7e98ab303f290c8ba871ce9fde1b77 [path history] [tgz]
  1. base-types.ts
  2. BUILD
  3. installed-node-modules-map.ts
  4. license-map-generator.ts
  5. licenses-map.ts
  6. node_modules_licenses.bzl
  7. package-license-info.ts
  8. README.md
  9. rollup.config.js
  10. shared-licenses-provider.ts
  11. tsconfig.json
  12. utils.ts
tools/node_tools/node_modules_licenses/README.md

This directory contains a tool to produce json file with information about licenses for npm workspace.

The tool consists of:

  • Command-line tool (entry point license-map-generator.ts) which gets as input a list of files in a node_modules folder, licenses config and produces a json file with packages grouped by their licenses. If the tool finds a file with an inappropriate license, then it returns error.

    Exact format for input and output data of the tool can be found in the source code.

  • Bazel rule node_modules_licenses (in the node_modules_licenses.bzl file), which wraps command-line tool and allows to call it during the build