Skip to content

Commit

Permalink
make work with RequireJS
Browse files Browse the repository at this point in the history
  • Loading branch information
mikesmullin committed Nov 27, 2014
1 parent e623eb1 commit 793de09
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 54 deletions.
6 changes: 4 additions & 2 deletions coffee/async2.coffee
@@ -1,8 +1,10 @@
not ((context, definition) ->
if 'function' is typeof require and
if 'function' is typeof define # RequireJS
return define definition
else if 'function' is typeof require and # Node.JS/CommonJS
typeof exports is typeof module
return module.exports = definition
return context['async'] = definition
return context['async'] = definition # Browser
)(this, (->
# constructor
# the if statement is for jQuery-like instantiation
Expand Down
93 changes: 49 additions & 44 deletions js/async2.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 1 addition & 8 deletions js/async2.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified js/async2.min.js.gz
Binary file not shown.

0 comments on commit 793de09

Please sign in to comment.