Socket
Socket
Sign inDemoInstall

grunt-license-finder

Package Overview
Dependencies
132
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    grunt-license-finder

Finds licenses in a node project and its dependencies


Version published
Maintainers
1
Install size
1.14 MB
Created

Readme

Source

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.

Keywords

FAQs

Last updated on 06 May 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc