Closed adwydman closed 8 years ago
I can't require it directly, because there's an error that goes like "Can't register the chip".
Hmm... that's interesting. It would be really beneficial if we could remove all require("sealious")
instances (it will allow us to remove the require-self
dependency and make the code easier to manage and test). Could you reproduce the error and post the output here? :)
Okay, now it works. :) Now I require Datastore directly and previously I tried to get it through ChipManager like in main.js
:
Sealious.init = function(){
require("./base-chips/_base-chips.js");
Sealious.Logger = require("./logger/logger.js");
Sealious.PluginManager.load_plugins();
Sealious.Datastore = Sealious.ChipManager.get_datastore_chip(); // this is how I tried to get it
};
That... is not going to work. Please not that you're requiring a chip-type into the Datastore variable, which should contain an instance of a datastore chip.
We have a larger issue at hands: I think that this is the time we discuss Datastore being provided as an argument to functions that use it.
I merged this branch to remove_unnecessary_dependencies
, so I'm closing this PR.
I removed and replaced
require("sealious")
, but there's a problem withfile-manager.js
- I can't require it directly, because there's an error that goes like "Can't register the chip".