Generate a list of licenses used within a project based on bower.json.
npm install grunt-license-bower~0.4.1
shell
npm install grunt-license-bower --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-bower');
`
or load grunt tasks automatically
`js
require('load-grunt-tasks')(grunt);
`
The "license" task
$3
In your project's Gruntfile, add a section named license to the data object passed into grunt.initConfig().
`js
grunt.initConfig({
license: {
your_target: {
// Target-specific file lists and/or options go here.
options: {
// Target-specific options go here.
directory: 'bower_components',
output: 'LICENSES'
},
},
},
})
`
$3
#### options.directory
Type: String
Default Value: bower_components
The path in which installed components should be saved. If not specified this defaults to bower_components.
#### options.output
Type: String
Default Value: LICENSES`