Skip to content

Commit

Permalink
fix loading issue in node.js
Browse files Browse the repository at this point in the history
  • Loading branch information
podefr committed Jun 3, 2014
1 parent d3b017d commit d2ca75f
Showing 1 changed file with 18 additions and 11 deletions.
29 changes: 18 additions & 11 deletions src/olives.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,21 @@
*/
"use strict";

module.exports = {
"Bind.plugin": require("data-binding-plugin"),
"Event.plugin": require("event-plugin"),
"LocalStore": require("local-observable-store"),
"LocationRouter": require("url-highway"),
"OObject": require("seam-view"),
"Place.plugin": require("place-plugin"),
"Plugins": require("seam"),
"SocketIOTransport": require("socketio-transport"),
"Stack": require("dom-stack")
};
// Don't load the same modules in browser
if (typeof window == "object") {
module.exports = {
"Bind.plugin": require("data-binding-plugin"),
"LocalStore": require("local-observable-store"),
"LocationRouter": require("url-highway"),
"OObject": require("seam-view"),
"Place.plugin": require("place-plugin"),
"Plugins": require("seam"),
"SocketIOTransport": require("socketio-transport"),
"Stack": require("dom-stack")
};
} else {
// than in node.js
module.exports = {
"SocketIOTransport": require("socketio-transport")
}
}

0 comments on commit d2ca75f

Please sign in to comment.