Hi Carlos,
a way would be to add an empty module which requires the library and add that to world requirements. The code for requiring an external library by a lively module is:
module(<<name>>).requires().requiresLib({
url: Config.codeBase + <<pathToLibFileWithFileEnding, relative to core>>, loadTest: function() { return !!Global.<<YourLibrary>>; }
}).toRun(function() { /* ... */ }
The loadTest has to be correct, otherwise the JSLoader might assume the library is loaded and not load your URL, or load your module although the lib is missing. We keep all our libs in /core/lib/, and that worked fine so far.
Does that help you?
Lars
P.S.: On lively web you can see that pattern in users/larswassermann/relax.js or in some of the acorn files for ast parsing.
_______________________________________________
lively-kernel mailing list
[hidden email]
http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel