Ember CLI addon that adds a license
command for exporting front-end NPM and Bower licenses.
It also provides a modal component for displaying licenses information on UI.
####Ember CLI
$ ember install ember-cli-license
####NPM
$ npm install --save-dev ember-cli-license
When invoked with no options:
$ ember license
It will:
- Look for a
node_modules
and abower_components
folder at current path - Scan recursively for npm packages and bower dependencies
- Output a csv file at
public/assets/licenses/licenses.csv
- Output an HTML file at
public/assets/licenses/licenses.html
- You can then add a component in your template to display license info on UI
Options can be specified on the command line
--production
or-prod
Type: Boolean
Default: false
If true, scanner will ignore devDependencies
--config
or-c
Type: String
A path to file which provides addition info to override scanning result
You can supply path to a config JSON file to pass along additional information to scanner.
$ ember license -c licenseConfig.json
// licenseConfig.json
{
// information listed in references array will override scanner results
"reference": [{
"name": "name",
"license": "license",
"repository": "repository",
"version": "version",
"licenseFile": "licenseFile",
"licenseContent": "licenseContent"
}],
// will be appended after npm results
"npm": [{
// same structure as above
}],
// will be appended after bower results
"bower": [{
// same structure as above
}]
}
Template:
{{license-page title='Title_Here'}}
Internally it will fetch the generated HTML file under /assets/licenses/licenses.html
The path is currently hardcoded.
The addon comes with minimal styles so that you can override them easily.
- Expose AJAX path
- Consolidate code
- Supply default license contents if not found in project
- davglass's license-checker
- AceMetrix's bower-license
MIT