sproutsocial / walltime-js

A JavaScript library for easily translating a UTC time to a "Wall Time" for a particular time zone.
MIT License
121 stars 12 forks source link

Fix parameters for RequireJS #21

Closed adamhooper closed 11 years ago

adamhooper commented 11 years ago

One file has an incorrect define() call, which throws off RequireJS and makes walltime-js unusable. The fix is a one-liner. (I also upgraded CoffeeScript, in a separate commit.)

jgable commented 11 years ago

In what way is it unusable? Wouldn't it have been unusable from the beginning? We use require js to compile the client side browser file, and it has not had any problems.

Can you walk me through the steps to confirm what you are saying?

adamhooper commented 11 years ago

I'm using RequireJS to build a web app, and I'm including the compiled walltime-js. When RequireJS reads the line, define('olson/timezonetime',["olson/helpers"], "timezonetime", init);, it defines olson/timezonetime as 'timezonetime' instead of as a function.

All the other define() calls are different from the particular one in 3efbdd67619766b39f47a23acc92079a9183672f

jgable commented 11 years ago

Interesting. Yeah, that appears to be incorrect based on the docs, wonder why our build is working.

Thanks for the PR, let me merge this in and do a couple tests to confirm.