1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-09-05 20:38:01 +00:00

Merge pull request #604 from natecain/module_exports

Module exports
This commit is contained in:
Jeremy Ruston
2014-05-07 14:05:45 +01:00
17 changed files with 10041 additions and 6487 deletions

View File

@@ -675,6 +675,9 @@ $tw.modules.execute = function(moduleName,moduleRoot) {
} else if(typeof moduleInfo.definition === "string") { // String
moduleInfo.exports = _exports;
$tw.utils.evalSandboxed(moduleInfo.definition,sandbox,tiddler.fields.title);
if(sandbox.module.exports) {
moduleInfo.exports = sandbox.module.exports; //more codemirror workaround
}
} else { // Object
moduleInfo.exports = moduleInfo.definition;
}