Skip to content
This repository has been archived by the owner on Apr 2, 2019. It is now read-only.

Commit

Permalink
Merge pull request #41 from akre54/umd
Browse files Browse the repository at this point in the history
UMD support
  • Loading branch information
zackbloom committed Dec 6, 2013
2 parents 45221ab + cd19381 commit 2c923ce
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions odometer.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ class Odometer
bindTransitionEnd: ->
return if @transitionEndBound
@transitionEndBound = true

# The event will be triggered once for each ribbon, we only
# want one render though
renderEnqueued = false
Expand Down Expand Up @@ -246,7 +246,7 @@ class Odometer

if /^odometer(-|$)/.test(cls)
continue

newClasses.push cls

newClasses.push 'odometer'
Expand Down Expand Up @@ -529,4 +529,14 @@ else
Odometer.init()
, false

window.Odometer = Odometer

if typeof define is 'function' and define.amd
# AMD. Register as an anonymous module.
define ['jquery'], ->
Odometer
else if typeof exports is not 'undefined'
# CommonJS
module.exports = Odometer
else
# Browser globals
window.Odometer = Odometer

0 comments on commit 2c923ce

Please sign in to comment.