add browserify support #12

Merged
merged 1 commit into from Feb 25, 2014

Projects

None yet

2 participants

@feross
Contributor
feross commented Feb 24, 2014

small change to make rusha build with the popular browserify tool

@feross
Contributor
feross commented Feb 24, 2014

added the built file and updated the branch

@srijs
Owner
srijs commented Feb 24, 2014

Hi there!

Thanks for contributing!

A few things on the matter:

  1. Please make you changes to the rusha.pp.js file, for this is the original source file. I will then update the other resulting files after the merge. This keeps commits clean.
  2. The historic reason this is the way it is, is to avoid browserify load and bundle the Buffer polyfill when it is not needed (see #9). But I see your problem. Would replacing Buffer with this.Buffer in your patch also work?
@feross
Contributor
feross commented Feb 25, 2014

Hi, thanks for the feedback and sorry for not reading the contributing instructions more closely. I've updated the PR with your feedback.

It turns out we can keep global.Buffer as is. The only change required to make browserify work is to change instanceof Buffer to Buffer.isBuffer (per https://github.com/feross/buffer#use-bufferisbuffer-instead-of-instanceof-buffer)

Thanks!

@srijs
Owner
srijs commented Feb 25, 2014

Great. Thanks for contributing!

@srijs srijs merged commit da9e115 into srijs:master Feb 25, 2014

1 check passed

default The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment