Skip to content

Commit

Permalink
Add CommonJS support
Browse files Browse the repository at this point in the history
  • Loading branch information
achinaou committed Dec 7, 2015
1 parent 8a62fb0 commit c8427fd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions backbone.basicauth.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['underscore', 'backbone'], factory);
} else if (typeof exports !== "undefined") {
// CommonJS export
module.exports = factory(require("underscore"), require("backbone"));
} else {
// Browser globals
root.amdWeb = factory(root._, root.Backbone);
Expand Down

0 comments on commit c8427fd

Please sign in to comment.