Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

browserify-override

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

browserify-override

Browserify middleware for local overrides

  • 0.0.9
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Browserify middleware for local customization of a compilation.

Installation

$ npm install browserify-override

Usage

browserify-override is a browserify middleware :

var b = require('browserify')();
b.use(require('browserify-override').rules({
  'sasl.js': {
    action: 'patch',
    rules: [{
      from: 'console.log',
      to: '//console.log'
    }]
  },
  'net.js': {
    action: 'replace',
    with: 'net.js',
    from: module
  },
  'dns': {
    action: 'define',
    with: 'dns.js',
    from: module
  },
  'element.js': {
    action: 'append',
    with: 'element.js',
    from: module
  }
}));

If rules are not explicitly provided, browserify-override will require("rules.js"), allowing you to set rules in a rules.js file in a valid node_modules folder.

Example

The canonical example of browserify-override, is the modifications in UProxy, which patchs the node-xmpp code-base to run as a chrome application based on the chrome.socket API.

Licence

MIT

FAQs

Package last updated on 13 Jul 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc