Skip to content

Fetch licences types and texts from all dependencies (and their dependencies) from your project. To make legal team happy.

License

Notifications You must be signed in to change notification settings

samhavens/licenses-list-generator

 
 

Repository files navigation

licenses-list-generator

Fetch licences types and copies from all dependencies (and their dependencies) from your project.

Inspiration

Open Source & legal team and a massive number of manual work...

Installation

npm install licenses-list-generator --save-dev

Usage

import licensesList from 'licenses-list-generator';
const licenses = licensesList();

Function returns array of objects with properties:

name type description
name string dependency name (from package.json)
path string path to dependency, starting from root
text string license text (see below)
type string license type (from package.json)
version string module version (from package.json)

null in all cases if not found.

Function returns license information to module/project from which it is called as well.

How licenses are found and read

It is a recursive walk through dependencies from package.json (to find dependencies and all its sub-dependencies). License text comes from LICENSE or LICENCE or LICENSE.md or LICENSE.txt or LICENSE.markdown file. Other information, like license type, name or version, comes from package.json file.

Returned array contains information related project dependencies ONLY. NOT devDependencies.

License

MIT

About

Fetch licences types and texts from all dependencies (and their dependencies) from your project. To make legal team happy.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%