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 <[email protected]>
 *   contributors: Okuno Kentaro, Ayumu Sato
 *   homepage: https://github.com/twada/licensify
 *   version: 1.4.0
 * 
 * base64-js:
 *   license: MIT
 *   author: T. Jameson Little <[email protected]>
 *   maintainers: beatgammit <[email protected]>, feross <[email protected]>
 *   homepage: https://github.com/beatgammit/base64-js
 *   version: 0.0.8
 * 
 * buffer:
 *   license: MIT
 *   author: Feross Aboukhadijeh <[email protected]>
 *   maintainers: feross <[email protected]>
 *   contributors: Romain Beauxis <[email protected]>, James Halliday <[email protected]>
 *   homepage: https://github.com/feross/buffer
 *   version: 3.3.1
 * 
 * core-util-is:
 *   license: MIT
 *   author: Isaac Z. Schlueter <[email protected]>
 *   homepage: https://github.com/isaacs/core-util-is
 *   version: 1.0.1
 * 
 * events:
 *   author: Irakli Gozalishvili <[email protected]>
 *   maintainers: gozala <[email protected]>, shtylman <[email protected]>
 *   homepage: https://github.com/Gozala/events
 *   version: 1.0.2
 * 
 * ieee754:
 *   license: MIT
 *   author: Feross Aboukhadijeh <[email protected]>
 *   maintainers: feross <[email protected]>
 *   contributors: Romain Beauxis <[email protected]>
 *   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 <[email protected]>
 *   homepage: https://github.com/retrofox/is-array
 *   version: 1.0.1
 * 
 * isarray:
 *   license: MIT
 *   author: Julian Gruber <[email protected]>
 *   maintainers: juliangruber <[email protected]>
 *   homepage: https://github.com/juliangruber/isarray
 *   version: 0.0.1
 * 
 * process:
 *   author: Roman Shtylman <[email protected]>
 *   maintainers: coolaj86 <[email protected]>, defunctzombie <[email protected]>
 *   homepage: https://github.com/shtylman/node-process#readme
 *   version: 0.11.1
 * 
 * process-nextick-args:
 *   license: MIT
 *   maintainers: cwmma <[email protected]>
 *   homepage: https://github.com/calvinmetcalf/process-nextick-args
 *   version: 1.0.2
 * 
 * readable-stream:
 *   license: MIT
 *   maintainers: isaacs <[email protected]>, tootallnate <[email protected]>, rvagg <[email protected]>, cwmma <[email protected]>
 *   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 <[email protected]>
 *   maintainers: rvagg <[email protected]>, bryce <[email protected]>
 *   homepage: https://github.com/rvagg/through2#readme
 *   version: 2.0.0
 * 
 * type-name:
 *   license: MIT
 *   author: Takuto Wada <[email protected]>
 *   maintainers: twada <[email protected]>
 *   contributors: azu, Yosuke Furukawa
 *   homepage: https://github.com/twada/type-name
 *   version: 1.0.1
 * 
 * util:
 *   license: MIT
 *   author: Joyent
 *   maintainers: shtylman <[email protected]>
 *   homepage: https://github.com/defunctzombie/node-util
 *   version: 0.10.3
 * 
 * util-deprecate:
 *   license: MIT
 *   author: Nathan Rajlich <[email protected]>
 *   maintainers: tootallnate <[email protected]>
 *   homepage: https://github.com/TooTallNate/util-deprecate
 *   version: 1.0.1
 * 
 * xtend:
 *   licenses: MIT
 *   author: Raynos <[email protected]>
 *   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%