swapify

1.0.4 • Public • Published

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').

Package Sidebar

Install

npm i swapify

Weekly Downloads

2

Version

1.0.4

License

ISC

Last publish

Collaborators

  • alanshaw