Simplified the NODE tests
This commit is contained in:
parent
c1a3c3d477
commit
646acf3a8d
53 changed files with 106 additions and 89 deletions
|
|
@ -64,7 +64,15 @@ var DEBUG = true; // this @define is overridden by the Closure Com
|
|||
*/
|
||||
var MAXDEBUG = false; // this @define is overridden by the Closure Compiler (to false) to remove MAXDEBUG-only code
|
||||
|
||||
/*
|
||||
* NODE should be true if we're running under NodeJS (eg, command-line), false if not (eg, web browser)
|
||||
*/
|
||||
var NODE = false;
|
||||
if (typeof module !== 'undefined') {
|
||||
NODE = true;
|
||||
}
|
||||
|
||||
if (NODE) {
|
||||
global.window = false; // provides an alternative "if (typeof window === 'undefined')" (ie, "if (window) ...")
|
||||
global.APPNAME = APPNAME;
|
||||
global.APPVERSION = APPVERSION;
|
||||
|
|
@ -72,6 +80,7 @@ if (typeof module !== 'undefined') {
|
|||
global.COMPILED = COMPILED;
|
||||
global.DEBUG = DEBUG;
|
||||
global.MAXDEBUG = MAXDEBUG;
|
||||
global.NODE = NODE;
|
||||
/*
|
||||
* TODO: When we're "required" by Node, should we return anything via module.exports?
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue