wrapify
v2.1.0
Published
Browserify transform to wrap modules or inject variables
Downloads
388
Readme
Wrapify
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));