Skip to content

Commit

Permalink
Support for requireJS and backbone.js
Browse files Browse the repository at this point in the history
  • Loading branch information
acrobat committed Dec 14, 2015
1 parent c2fb640 commit 8b2f478
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions js/bootstrap-markdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,18 @@
* limitations under the License.
* ========================================================== */

!function ($) {

(function(factory){
if (typeof define === "function" && define.amd) {
//RequireJS
define(["jquery"], factory);
} else if (typeof exports === 'object') {
//Backbone.js
factory(require('jquery'));
} else {
//Jquery plugin
factory(jQuery);
}
}(function($){
"use strict"; // jshint ;_;

/* MARKDOWN CLASS DEFINITION
Expand Down Expand Up @@ -1371,4 +1381,4 @@
})
});

}(window.jQuery);
}));

0 comments on commit 8b2f478

Please sign in to comment.