https://github.com/mwittig/grunt-license-crawler
Grunt task for npm-license-crawler. Analyzes license information for multiple node.js modules (package.json files) as part of your software project.
https://github.com/mwittig/grunt-license-crawler
grunt-plugin license license-management license-scan licensing
Last synced: 11 months ago
JSON representation
Grunt task for npm-license-crawler. Analyzes license information for multiple node.js modules (package.json files) as part of your software project.
- Host: GitHub
- URL: https://github.com/mwittig/grunt-license-crawler
- Owner: mwittig
- License: bsd-3-clause
- Created: 2015-04-14T18:31:55.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2020-03-17T03:02:10.000Z (over 6 years ago)
- Last Synced: 2025-06-19T04:41:44.131Z (about 1 year ago)
- Topics: grunt-plugin, license, license-management, license-scan, licensing
- Language: JavaScript
- Size: 13.7 KB
- Stars: 1
- Watchers: 1
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# grunt-license-crawler
Grunt task for [npm-license-crawler](https://www.npmjs.com/package/npm-license-crawler). Analyzes license information for multiple node.js modules (package.json files) as part of your software project.
## Getting Started
This plugin requires Grunt `~0.4.1`
If you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out
the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create
a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins.
Once you're familiar with that process, you may install this plugin with this command:
```shell
npm install grunt-license-crawler --save-dev
```
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
```js
grunt.loadNpmTasks('grunt-license-crawler');
```
## The "license-crawler" task
### Overview
In your project's Gruntfile, add a section named `license-crawler` to the data object passed into `grunt.initConfig()`.
```js
grunt.initConfig({
'license-crawler': {
your_target: {
// Target-specific file lists and/or options go here.
},
},
})
```
### Options
#### options.start
Type: `Array`
Default value: [ `.` ]
Path to the directory the license search should start from. Multiple paths can be specified.
#### options.exclude
Type: `Array`
Default Value: `undefined`
Path to a directory to be excluded (and its subdirectories) from the search. Multiple paths can be specified.
#### options.unknown
Type: `Boolean`
Default value: `false`
Only generate a list of licenses that can't be determined or have been guessed.
#### options.dependencies
Type: `Boolean`
Default value: `false`
Only generate a list of third-party licenses, i.e., only list the dependencies defined in package.json.
#### options.json
Type: `String`
Default Value: `undefined`
Export data as JSON to the given file path. Be cautious, the task will overwrite file if exists!
#### options.csv
Type: `String`
Default Value: `undefined`
Export data as CSV to the given file path. Be cautious, the task will overwrite file if exists!
#### options.omitVersion
Type: `Boolean`
Default value: `false`
Don't display versions in result (e.g. "npm-license-crawler@0.1.5" becomes "npm-license-crawler")
#### options.onlyDirectDependencies
Type: `Boolean`
Default value: `false`
Show only direct dependencies licenses, i.e., don't list dependencies of dependencies.
#### options.relativeLicensePath
Type: `Boolean`
Default value: `false`
Output the relative file path for license files.
## History
* 20150414, V0.0.1
* Initial Version
* 20150819, V0.0.2
* Updated to npm-license-crawler@0.1.0 (thanks @Kienz)
* 20160108, V0.0.3
* Revised README
* Updated to npm-license-crawler@0.1.1
* Updated license info as part of package descriptor. Now using SPDX license tag.
* 20160311, V0.0.4
* Updated to npm-license-crawler@0.1.3
* 20160419, V0.0.5
* Updated to npm-license-crawler@0.1.4 which includes bug fix for CSV files
* Added travis-ci build descriptor
* 20180220, V0.0.6
* Updated to npm-license-crawler@0.1.7 which includes new options
* Added documentation for new options