Created
October 29, 2014 19:36
-
-
Save programmarchy/1655e571b6bb36f17c02 to your computer and use it in GitHub Desktop.
browserify issue #850
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this works ok | |
browserify -r './kitten.js:nyan' -e pizza.js > bundle.js | |
# but full-paths causes an error: Uncaught Error: Cannot find module .../kitten.js | |
browserify -r './kitten.js:nyan' -e pizza.js --full-paths > bundle.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>browserify example</title> | |
</head> | |
<body> | |
<script src = "./bundle.js"></script> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function() { | |
this.meow = function() { | |
console.log('a kitten says meow'); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var EventEmitter = require('events').EventEmitter; | |
var Nyan = require('nyan'); | |
var emitter = new EventEmitter; | |
emitter.on('pizza', function(message) { | |
console.log(message); | |
}); | |
emitter.emit('pizza', 'pizza is extremely yummy'); | |
var nyan = new Nyan; | |
nyan.meow(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment