mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-11-16 15:28:24 +00:00
Additional improvement to CommonJS Modules support
Now implements (and mostly follows) requirements of Modules/1.1 spec
implementes only the required "secure sandbox" subset of the spec
`module` free variable changed from the `moduleInfo` to an id container
`require` free variable given a "main" property
boot module scope closed and exported
this also changes the interface between boot and bootprefix slightly
(should now be able to create multiple TW instances under node)
BREAKING CHANGES:
The tiddlywiki module itself now exports a single constructor function
Modules which depended on `module` referring to `moduleInfo` will break
Modules which don't conform to Modules/1.1 will break
(by attempting to modify require.main or module.id)
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
This is invoked as a shell script by NPM when the `tiddlywiki` command is typed
|
||||
*/
|
||||
|
||||
var $tw = require("./boot/boot.js").$tw;
|
||||
var $tw = require("./boot/boot.js").TiddlyWiki();
|
||||
|
||||
// Pass the command line arguments to the boot kernel
|
||||
$tw.boot.argv = Array.prototype.slice.call(process.argv,2);
|
||||
|
||||
Reference in New Issue
Block a user