1.0.4 • Published 9 years ago

swapify v1.0.4

Weekly downloads
9
License
ISC
Repository
github
Last release
9 years ago

swapify Build Status Dependency Status

Swap out your requires!

Example

index.js

var foo = require('bar')

package.json

{
  "browserify": {
    "transform": [ "swapify" ]
  },
  "swapify": {
    "swaps": {
      "^bar$": "./baz.js"
    }
  }
}
browserify index.js -o bundle.js

The call to require('bar') is replaced with a call to require('./baz.js').