Browserify plugin to prepend license header to your bundle
npm install licensifylicensify
================================
Browserify plugin to prepend license header to your bundle
[![Build Status][travis-image]][travis-url]
[![NPM version][npm-image]][npm-url]
[![Dependency Status][depstat-image]][depstat-url]
[![License][license-image]][license-url]
DESCRIPTION
---------------------------------------
licensify is a Browserify plugin to prepend license header to your bundle as follows.
``javascript`
/**
* Modules in this bundle
* @license
*
* licensify:
* license: MIT (http://opensource.org/licenses/MIT)
* author: Takuto Wada
* contributors: Okuno Kentaro, Ayumu Sato, Denis Sokolov, yudppp, Daijiro Wachi
* homepage: https://github.com/twada/licensify
* version: 3.1.0
*
* convert-source-map:
* license: MIT (http://opensource.org/licenses/MIT)
* author: Thorsten Lorenz
* maintainers: thlorenz
* homepage: https://github.com/thlorenz/convert-source-map
* version: 1.2.0
*
* core-util-is:
* license: MIT (http://opensource.org/licenses/MIT)
* author: Isaac Z. Schlueter
* maintainers: isaacs
* homepage: https://github.com/isaacs/core-util-is#readme
* version: 1.0.2
*
* inherits:
* license: ISC (http://opensource.org/licenses/ISC)
* maintainers: isaacs
* homepage: https://github.com/isaacs/inherits#readme
* version: 2.0.1
*
* isarray:
* license: MIT (http://opensource.org/licenses/MIT)
* author: Julian Gruber
* maintainers: juliangruber
* homepage: https://github.com/juliangruber/isarray
* version: 1.0.0
*
* offset-sourcemap-lines:
* license: MIT (http://opensource.org/licenses/MIT)
* author: Takuto Wada
* maintainers: twada
* homepage: https://github.com/twada/offset-sourcemap-lines
* version: 0.1.0
*
* osi-licenses:
* license: MIT (http://opensource.org/licenses/MIT)
* author: Meryn Stol
* maintainers: meryn
* homepage: https://github.com/meryn/osi-licenses
* version: 0.1.1
*
* oss-license-name-to-url:
* license: MIT (http://opensource.org/licenses/MIT)
* author: Zeke Sikelianos
* maintainers: zeke
* homepage: https://github.com/npm/oss-license-name-to-url
* version: 1.2.1
*
* process-nextick-args:
* license: MIT (http://opensource.org/licenses/MIT)
* maintainers: cwmma
* homepage: https://github.com/calvinmetcalf/process-nextick-args
* version: 1.0.6
*
* readable-stream:
* license: MIT (http://opensource.org/licenses/MIT)
* maintainers: isaacs
* homepage: https://github.com/nodejs/readable-stream#readme
* version: 2.0.6
*
* source-map:
* license: BSD-3-Clause (http://opensource.org/licenses/BSD-3-Clause)
* author: Nick Fitzgerald
* maintainers: mozilla-devtools
* contributors: Simon Lydell
* homepage: https://github.com/mozilla/source-map
* version: 0.5.3
*
* string_decoder:
* license: MIT (http://opensource.org/licenses/MIT)
* maintainers: substack
* homepage: https://github.com/rvagg/string_decoder
* version: 0.10.31
*
* through2:
* license: MIT (http://opensource.org/licenses/MIT)
* author: Rod Vagg
* maintainers: rvagg
* homepage: https://github.com/rvagg/through2#readme
* version: 2.0.1
*
* type-name:
* license: MIT (http://opensource.org/licenses/MIT)
* author: Takuto Wada
* maintainers: twada
* contributors: azu, Yosuke Furukawa
* homepage: https://github.com/twada/type-name
* version: 2.0.0
*
* util-deprecate:
* license: MIT (http://opensource.org/licenses/MIT)
* author: Nathan Rajlich
* maintainers: tootallnate
* homepage: https://github.com/TooTallNate/util-deprecate
* version: 1.0.2
*
* xtend:
* license: MIT (http://opensource.org/licenses/MIT)
* author: Raynos
* maintainers: raynos
* contributors: Jake Verbaten, Matt Esch
* homepage: https://github.com/Raynos/xtend
* version: 4.0.1
*
* 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
...(your bundle continues ...)
HOW TO USE
---------------------------------------
by command-line
``
$ browserify main.js -p licensify > build/bundle.js
or programmatically
`javascript
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)
`
Since 2.0.0, licensify scans and traverses [browser field if exists.
Since 3.0.0, licensify ignores packages which are marked as private in package.json by default.
#### includePrivate option
if includePrivate option is truthy, licensify includes private packages too.
by command-line
``
$ $(npm bin)/browserify path/to/your/file.js -p [ licensify --includePrivate ] > build/bundle.js
or programmatically
`javascript
var browserify = require('browserify');
var licensify = require('licensify');
var b = browserify();
b.add('/path/to/your/file');
b.plugin(licensify, { includePrivate: true });
b.bundle().pipe(dest)
`
INSTALL
---------------------------------------
```
$ npm install --save-dev licensify
AUTHOR
---------------------------------------
* Takuto Wada
CONTRIBUTORS
---------------------------------------
* Okuno Kentaro
* Ayumu Sato
* Denis Sokolov
* yudppp
* Daijiro Wachi
* Adam Prescott
* Hayato Mizuno
SUPPORT POLICY
---------------------------------------
Node under maintenance is supported.
NOTE: If licensify works in any of the unsupported environments, it is purely coincidental and has no bearing on future compatibility. Use at your own risk.
LICENSE
---------------------------------------
Licensed under the MIT license.
[npm-url]: https://www.npmjs.com/package/licensify
[npm-image]: https://badge.fury.io/js/licensify.svg
[travis-url]: https://travis-ci.org/twada/licensify
[travis-image]: https://secure.travis-ci.org/twada/licensify.svg?branch=master
[depstat-url]: https://gemnasium.com/twada/licensify
[depstat-image]: https://gemnasium.com/twada/licensify.svg
[license-url]: https://twada.mit-license.org/2014-2017
[license-image]: https://img.shields.io/badge/license-MIT-brightgreen.svg