Skip to content

Instantly share code, notes, and snippets.

@biophonc
Created September 18, 2013 19:43
Show Gist options
  • Select an option

  • Save biophonc/6614489 to your computer and use it in GitHub Desktop.

Select an option

Save biophonc/6614489 to your computer and use it in GitHub Desktop.

Revisions

  1. biophonc revised this gist Sep 18, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion minimal jquery plugin skeleton in coffeescript
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    # @see: https://github.com/umdjs/umd/blob/master/jqueryPluginCommonjs.js
    # @see: https://github.com/umdjs/umd/blob/master/jqueryPlugin.js
    ((factory) ->
    if typeof define is 'function' && define.amd
    # AMD. Register as anonymous module.
  2. biophonc created this gist Sep 18, 2013.
    15 changes: 15 additions & 0 deletions minimal jquery plugin skeleton in coffeescript
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    # @see: https://github.com/umdjs/umd/blob/master/jqueryPluginCommonjs.js
    ((factory) ->
    if typeof define is 'function' && define.amd
    # AMD. Register as anonymous module.
    define ['jquery'], factory
    return
    else
    # Browser globals.
    factory jQuery
    return
    )(($) ->
    $.fn.foo = () ->
    alert "wtf"
    return
    )