npm-license-tracker
Version:
Module to track all npm dependencies and their corrosponding licenses.
66 lines (49 loc) • 2.33 kB
Markdown
[](https://www.npmjs.com/package/npm-license-tracker)
[](https://www.npmjs.com/package/npm-license-tracker)
npm-license-tracker will track all the npm dependencies and their corrosponding licenses in the specified package.
The module will generate the JSON file with all meta information about npm packages and copy corrosponding license files in a directory named "npm_licenses". This new folder will be created under the same project directory.
<ul>
<li>Creation of JSON file with meta information about licenses</li>
<li>Copying license files</li>
<li>Creation of CSV file with meta information for Audit purpose</li>
<li>Find Immediate and transitive dependencies</li>
</ul>
| Date | Author | Description |
| ----------------- | ----------------- | ----------- |
| 2018-03-15 | AmittK | Module capable to find immediate or transitive dependencies. |
| 2017-09-24 | AmittK | Module to track npm dependencies with all meta information and license files. |
```
npm install -g npm-license-tracker
```
- Install the module using: npm install -g npm-license-tracker
- On command line, execute the command: npm-tracker "Path to package.json"
- To generate CSV, execute the command: npm-tracker "Path to package.json" true || false (<em>default value is false </em>)
```
npm install npm-license-tracker
```
```js
var licenseChecker = require('npm-license-tracker/src');
var options = {
path: 'C:\\Workspace\\DEMO_PROJECT',
isExcel: true
}
licenseChecker.run(options)
```
| API | Type | Description |
| -----------------|------------| ------------------------------------------------|
| path | string | Path to package.json in the project |
| isExcel | boolean | For generating CSV file, default value is false |

```
npm-license-tracker --help
```
MIT