rollup-plugin-license-xml
rollup-plugin-license-xml
Creates a license.xml file from all your dependencies see template
Install
$ npm install --save-dev rollup-plugin-license-xml
Usage
Importing or Requiring
Import as ES Module
Requiring as CJS
const license =
Usage from rollup config
entry: 'module.js' dest: 'index.js' format: 'cjs' plugins:
Usage from build script
results
logged to console on rollup completion
rollup-plugin-license-xml /test/_fixtures/bundle-a.js MIT https://raw.githubusercontent.com/edewit/rollup-plugin-license/master/LICENSE ...
Options
- root - optional
- type: String
- default:
process.cwd()
- description: Application directory, used to display file paths relatively
- writeTo - optional
- type: Function
- default:
null
- description: Callback to be invoked with formatted string
- function will be invoked with:
- analysisString (String)
- onAnalysis - optional
- type: Function
- default:
null
- description: Callback to be invoked with analysis object
- function will be invoked with:
- analysisObject (Object)
- modules (Array) - array of
module
analysis objects- module (Object)
- id (String) - path of module / rollup module id
- files (Array) - list of files
- module (Object)
- modules (Array) - array of
- analysisObject (Object)