mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-27 03:57:21 +00:00
Refactor boot sequence
This is the start of making it possible to use TiddlyWiki5 as a library from a node.js application
This commit is contained in:
parent
1fd59a4bd3
commit
644d9f9405
@ -1374,8 +1374,9 @@ $tw.boot.startup = function() {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/////////////////////////// Decrypt tiddlers and then startup
|
/////////////////////////// Main boot function to decrypt tiddlers and then startup
|
||||||
|
|
||||||
|
$tw.boot.boot = function() {
|
||||||
// Initialise crypto object
|
// Initialise crypto object
|
||||||
$tw.crypto = new $tw.utils.Crypto();
|
$tw.crypto = new $tw.utils.Crypto();
|
||||||
// Initialise password prompter
|
// Initialise password prompter
|
||||||
@ -1387,6 +1388,12 @@ $tw.boot.decryptEncryptedTiddlers(function() {
|
|||||||
// Startup
|
// Startup
|
||||||
$tw.boot.startup();
|
$tw.boot.startup();
|
||||||
});
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/////////////////////////// Autoboot in the browser
|
||||||
|
|
||||||
|
if($tw.browser) {
|
||||||
|
$tw.boot.boot();
|
||||||
|
}
|
||||||
|
|
||||||
})();
|
})();
|
||||||
|
@ -5,3 +5,6 @@ This is invoked as a shell script by NPM when the `tiddlywiki` command is typed
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
var tiddlywiki = require("./boot/boot.js");
|
var tiddlywiki = require("./boot/boot.js");
|
||||||
|
|
||||||
|
// Boot the TW5 app
|
||||||
|
$tw.boot.boot();
|
||||||
|
Loading…
Reference in New Issue
Block a user