npm

wrapify

2.1.0 • Public • Published

Wrapify

Build Status

Browserify transform to wrap modules or inject variables.

Usage

npm install --save-dev wrapify

Add to package.json -

{
  "version": "1.0.0",
  "name": "my-pkg",
  "browserify": {
    "transform": [
      "wrapify"
    ]
  },
  "wrapify": {
    "inject": {
      "jquery/dist/jquery": {
        "./src/wrapper/windowProxy": {
          "window": ".proxyWindow"
        }
      }
    }
  }
}

will transform into

(function (window) {
/*!
 * jQuery JavaScript Library v1.11.3
 * http://jquery.com/
 ...
 */
 ...
}(require("/my-lib/src/wrapper/windowProxy.js").proxyWindow));

Readme

Keywords

Package Sidebar

Install

npm i wrapify

Weekly Downloads

49

Version

2.1.0

License

none

Last publish

Collaborators

  • asmblah