grunt-license-finder
Finds licenses in a node project and its dependencies
Last updated 3 years ago by iandotkelly .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install grunt-license-finder 
SYNC missed versions from official npm registry.

grunt-license-finder Build StatusDependency Status

Finds licenses in a node project and its dependencies

Getting Started

This plugin requires Grunt ~0.4.5

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-license-finder --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-license-finder');

The "license_finder" task

Overview

In your project's Gruntfile, add a section named license_finder to the data object passed into grunt.initConfig().

grunt.initConfig({
  license_finder: {
    all:
      options: {
        // Task-specific options go here.
      }
    }
  },
});

Options

options.directory

Type: String Default value: current project directory

A string value for the path of the node project to scan

options.production

Type: Boolean Default value: false

A boolean value. If true, only production dependencies are included in the scan

options.out

Type: String Default value: ./licenses.txt

A string value for the filename of the output of the scan.

options.csv

Type: Boolean Default value: ./licenses.txt

A boolean value. If true the output is in a comma-separated-variable format for import into a spreadsheet.

options.depth

Type: Number Default value: if undefined this defaults to infinite

The maximum depth of node_modules to traverse, 0 means the immediate dependencies, add 1 per module depth

Usage Examples

Custom Options

Example

grunt.initConfig({
  license_finder: {
    all: {
      options: {
        production: true,
        directory: '/Home/me/some-project',
        out: '/Home/me/some-project/licenses.txt',
        csv: true
      }
    }
  }
});

Example output

commander@0.6.1 [license(s): MIT]
└── readme files: MIT

read-installed@0.2.2 [license(s): BSD]
└── license files: BSD

glob@3.2.3 [license(s): BSD]
├── package.json:  BSD
└── license files: BSD

archy@0.0.2 [license(s): MIT/X11]
└── package.json:  MIT/X11

json-stringify-safe@5.0.0 [license(s): BSD]
├── package.json:  BSD
└── license files: BSD

should@1.2.2 [license(s): MIT]
└── readme files: MIT

For output in CSV format use the csv: true option.

Current Tags

  • 2.0.0                                ...           latest (3 years ago)

13 Versions

  • 2.0.0                                ...           3 years ago
  • 1.3.0                                ...           4 years ago
  • 1.2.2                                ...           5 years ago
  • 1.2.1                                ...           5 years ago
  • 1.2.0                                ...           5 years ago
  • 1.1.0                                ...           6 years ago
  • 1.0.2                                ...           6 years ago
  • 1.0.0                                ...           6 years ago
  • 0.1.3                                ...           6 years ago
  • 0.1.2                                ...           6 years ago
  • 0.1.1                                ...           6 years ago
  • 0.1.0                                ...           6 years ago
  • 0.0.0                                ...           6 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (3)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |