0.7.2 • Published 7 years ago

licenses-list-generator v0.7.2

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

licenses-list-generator

Fetch licences types and copies from all dependencies (and their dependencies) from 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();

Live example (will create ./static/licenses.txt file which contains licenses from all dependencies used in this project):

npm run licenses

Function returns array of objects with properties:

nametypedescription
namestringdependency name (from package.json)
pathstringpath to dependency, starting from root
textstringlicense text (see below)
typestringlicense type (from package.json)
versionstringmodule 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). Module is searching for files: LICENSE, LICENSE.md, LICENSE.txt, LICENCE, LICENSE.markdown, LICENSE-MIT, LICENSE.rst. 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

0.7.2

7 years ago

0.7.1

7 years ago

0.7.0

7 years ago

0.6.0

7 years ago

0.5.4

7 years ago

0.5.3

7 years ago

0.5.2

7 years ago

0.5.1

7 years ago

0.5.0

7 years ago

0.0.1

7 years ago