1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-09-12 15:56:05 +00:00

Revert "Merge pull request #160 from natecain/commonjs"

This reverts commit 661621c3f7, reversing
changes made to d3d72eff1b.
This commit is contained in:
Jeremy Ruston
2013-10-12 16:29:20 +01:00
parent 661621c3f7
commit 5ef4123b3d
34 changed files with 37 additions and 546 deletions

View File

@@ -12,11 +12,12 @@ See Boot.js for further details of the boot process.
\*/
var _bootprefix = (function($tw) {
"use strict";
$tw = $tw || {browser: typeof(window) !== "undefined" ? {} : null};
// Set up $tw global for the browser
if(typeof(window) === "undefined") {
global.$tw = global.$tw || {}; // No `browser` member for the server
} else {
window.$tw = window.$tw || {browser: {}};
}
/*
Information about each module is kept in an object with these members:
@@ -80,18 +81,3 @@ Convenience function for pushing a tiddler onto the preloading array
$tw.preloadTiddler = function(fields) {
$tw.preloadTiddlers.push(fields);
};
return $tw
});
if(typeof(exports) === "undefined") {
// Set up $tw global for the browser
window.$tw = _bootprefix();
} else {
// Export functionality as a module
exports.bootprefix = _bootprefix;
}