Browserify plugin to prepend license header to your bundle
licensify
is a browserify plugin to prepend license header to your bundle as follows.
/**
* Modules in this bundle
*
* licensify:
* license: MIT
* author: Takuto Wada <takuto.wada@gmail.com>
* contributors: Okuno Kentaro, Ayumu Sato
* homepage: https://github.com/twada/licensify
* version: 1.4.0
*
* base64-js:
* license: MIT
* author: T. Jameson Little <t.jameson.little@gmail.com>
* maintainers: beatgammit <t.jameson.little@gmail.com>, feross <feross@feross.org>
* homepage: https://github.com/beatgammit/base64-js
* version: 0.0.8
*
* buffer:
* license: MIT
* author: Feross Aboukhadijeh <feross@feross.org>
* maintainers: feross <feross@feross.org>
* contributors: Romain Beauxis <toots@rastageeks.org>, James Halliday <mail@substack.net>
* homepage: https://github.com/feross/buffer
* version: 3.3.1
*
* core-util-is:
* license: MIT
* author: Isaac Z. Schlueter <i@izs.me>
* homepage: https://github.com/isaacs/core-util-is
* version: 1.0.1
*
* events:
* author: Irakli Gozalishvili <rfobic@gmail.com>
* maintainers: gozala <rfobic@gmail.com>, shtylman <shtylman@gmail.com>
* homepage: https://github.com/Gozala/events
* version: 1.0.2
*
* ieee754:
* license: MIT
* author: Feross Aboukhadijeh <feross@feross.org>
* maintainers: feross <feross@feross.org>
* contributors: Romain Beauxis <toots@rastageeks.org>
* homepage: https://github.com/feross/ieee754#readme
* version: 1.1.6
*
* inherits:
* license: ISC
* homepage: https://github.com/isaacs/inherits
* version: 2.0.1
*
* is-array:
* license: MIT
* maintainers: retrofox <rdsuarez@gmail.com>
* homepage: https://github.com/retrofox/is-array
* version: 1.0.1
*
* isarray:
* license: MIT
* author: Julian Gruber <mail@juliangruber.com>
* maintainers: juliangruber <julian@juliangruber.com>
* homepage: https://github.com/juliangruber/isarray
* version: 0.0.1
*
* process:
* author: Roman Shtylman <shtylman@gmail.com>
* maintainers: coolaj86 <coolaj86@gmail.com>, defunctzombie <shtylman@gmail.com>
* homepage: https://github.com/shtylman/node-process#readme
* version: 0.11.1
*
* process-nextick-args:
* license: MIT
* maintainers: cwmma <calvin.metcalf@gmail.com>
* homepage: https://github.com/calvinmetcalf/process-nextick-args
* version: 1.0.2
*
* readable-stream:
* license: MIT
* maintainers: isaacs <isaacs@npmjs.com>, tootallnate <nathan@tootallnate.net>, rvagg <rod@vagg.org>, cwmma <calvin.metcalf@gmail.com>
* homepage: https://github.com/nodejs/readable-stream#readme
* version: 2.0.2
*
* string_decoder:
* license: MIT
* homepage: https://github.com/rvagg/string_decoder
* version: 0.10.31
*
* through2:
* license: MIT
* author: Rod Vagg <r@va.gg>
* maintainers: rvagg <rod@vagg.org>, bryce <bryce@ravenwall.com>
* homepage: https://github.com/rvagg/through2#readme
* version: 2.0.0
*
* type-name:
* license: MIT
* author: Takuto Wada <takuto.wada@gmail.com>
* maintainers: twada <takuto.wada@gmail.com>
* contributors: azu, Yosuke Furukawa
* homepage: https://github.com/twada/type-name
* version: 1.0.1
*
* util:
* license: MIT
* author: Joyent
* maintainers: shtylman <shtylman@gmail.com>
* homepage: https://github.com/defunctzombie/node-util
* version: 0.10.3
*
* util-deprecate:
* license: MIT
* author: Nathan Rajlich <nathan@tootallnate.net>
* maintainers: tootallnate <nathan@tootallnate.net>
* homepage: https://github.com/TooTallNate/util-deprecate
* version: 1.0.1
*
* xtend:
* licenses: MIT
* author: Raynos <raynos2@gmail.com>
* contributors: Jake Verbaten, Matt Esch
* homepage: https://github.com/Raynos/xtend
* version: 4.0.0
*
* This header is generated by licensify (https://github.com/twada/licensify)
*/
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
...(your bundle continues ...)
by command-line
$ browserify main.js -p licensify > build/bundle.js
or programmatically
var browserify = require('browserify');
var licensify = require('licensify');
var fs = require('fs');
var dest = fs.createWriteStream('/path/to/bundle.js');
var b = browserify();
b.add('/path/to/your/file');
b.plugin(licensify);
b.bundle().pipe(dest)
if scanBrowser
option is truthy, licensify scans and traverses browser
field too.
by command-line
$ browserify main.js -p [ licensify --scanBrowser ] > build/bundle.js
or programmatically
var b = browserify();
b.add('/path/to/your/file');
b.plugin(licensify, {scanBrowser: true});
b.bundle().pipe(dest)
$ npm install --save-dev licensify
Licensed under the MIT license.