Skip to content

Commit 3917e75

Browse files
committed
Make ReactFireMixin browserifyable
The curent build footer export won't export anything when ReactFireMixin is browserified. Replacing the build header & footer with standard UMD boilerplate will fix this and also make it usable for AMD users.
1 parent 2101ae8 commit 3917e75

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed

build/footer

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,2 @@
11
return ReactFireMixin;
2-
})();
3-
4-
// Export ReactFireMixin if this is being run in node
5-
if (typeof module !== "undefined" && typeof process !== "undefined") {
6-
module.exports = ReactFireMixin;
7-
}
2+
}));

build/header

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,18 @@
88
* License: MIT
99
*/
1010

11-
var ReactFireMixin = (function() {
11+
;(function (root, factory) {
12+
if (typeof exports === "object") {
13+
// CommonJS
14+
module.exports = factory();
15+
} else if (typeof define === "function" && define.amd) {
16+
// AMD
17+
define([], function() {
18+
return (root.ReactFireMixin = factory());
19+
});
20+
} else {
21+
// Global Variables
22+
root.ReactFireMixin = factory();
23+
}
24+
}(this, function() {
1225
"use strict";

0 commit comments

Comments
 (0)