Skip to content
forked from twada/licensify

Browserify plugin to prepend license header to your bundle

Notifications You must be signed in to change notification settings

Useclark/licensify

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

licensify

Browserify plugin to prepend license header to your bundle

Build Status NPM version Dependency Status License

DESCRIPTION

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 ...)

HOW TO USE

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)

scanBrowser option

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)

INSTALL

$ npm install --save-dev licensify

AUTHOR

CONTRIBUTORS

LICENSE

Licensed under the MIT license.

About

Browserify plugin to prepend license header to your bundle

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%