You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extract third-party licenses to a file. Two options:
use the plugin during the build process browserify --plugin browserify-plugin-license-notice
run the CLI tool against an already generated bundle browserify-bundle-license-notice dist/bundle.js
Format of the generated file:
Package: @babel/runtime
Source: https://npmjs.com/package/@babel/runtime
License: MIT
MIT License
Copyright (c) 2014-present Sebastian McKenzie and other contributors
Permission is hereby granted, [... shortened ...]
-----
Package: capital-case
Source: https://npmjs.com/package/capital-case
License: MIT
The MIT License (MIT)
Copyright (c) 2014 Blake Embrey (hello@blakeembrey.com)
Permission is hereby granted, [... shortened ...]
-----
constbrowserify=require('browserify');constlicenseNotice=require('browserify-plugin-license-notice');browserify({debug: true}).plugin(licenseNotice,{// configuration as usual}).bundle().pipe(fs.createWriteStream('bundle.js','utf8'));
Options
out (string)
Path of the file to write.
check (boolean)
If true, the plugin will throw if a difference is detected between the output and an already existing file. Use this as a CI step to ensure that the licenses file is up-to-date in your version control.