wrapify
2.1.0 • Public • Published 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) {
...
}(require("/my-lib/src/wrapper/windowProxy.js").proxyWindow));
Package Sidebar
Install
Weekly Downloads