1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-25 23:03:15 +00:00
TiddlyWiki5/tiddlywiki.js
natecain b8c37a26ef 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)
2013-10-11 11:32:58 -04:00

14 lines
311 B
JavaScript
Executable File

#!/usr/bin/env node
/*
This is invoked as a shell script by NPM when the `tiddlywiki` command is typed
*/
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);
// Boot the TW5 app
$tw.boot.boot();