springmeyer / arc.js

great circle routes in javascript
http://springmeyer.github.io/arc.js/
BSD 2-Clause "Simplified" License
369 stars 70 forks source link

Support browserify by using UMD #27

Closed buchanae closed 8 years ago

buchanae commented 8 years ago

I found that arc wasn't loading when I was using browserify, so I moved the module to a UMD style definition.

tmcw commented 8 years ago

This shouldn't be necessary; the window check for arc's exports needs a much smaller tweak

buchanae commented 8 years ago

UMD is a well known concept, with lots of thought behind it, for a reason, including isolating the module code from the global scope.

tmcw commented 8 years ago

I don't disagree with UMD, but I know that this is the wrong way to solve this problem. The "is this a browser" check was broken, and needs a one-line fix.

tmcw commented 8 years ago

Fixed by https://github.com/springmeyer/arc.js/pull/26