Skip to content

Instantly share code, notes, and snippets.

@amitayd
Created May 15, 2013 00:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amitayd/5580837 to your computer and use it in GitHub Desktop.
Save amitayd/5580837 to your computer and use it in GitHub Desktop.
Demonstrating a transitive dependency issue with browserify. It's an augmentation of the multi-bundle example given in browserify docs, with the addition of robot.js requires circuit.js, so the dependency relation is: beep.js -> robot.js -> circuit.js and boop.js -> robot.js -> circuit.js
var robot = require('./robot');
console.log(robot('beep'));
var robot = require('./robot');
console.log(robot('boop'));
module.exports = function (s) { return "zzzzbzzb" };
var circuit = require('./circuit.js');
module.exports = function (s) { return s.toUpperCase() + '!' + circuit()};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment