Working through Jekyll build issues with uncompiled ES6 code
This commit is contained in:
parent
a927d9ca4f
commit
61e44fbf1f
52 changed files with 385 additions and 285 deletions
|
|
@ -49,8 +49,10 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
var Usr = require("../../shared/es6/usrlib");
|
||||
var Web = require("../../shared/es6/weblib");
|
||||
if (NODE) {
|
||||
var Usr = require("../../shared/es6/usrlib");
|
||||
var Web = require("../../shared/es6/weblib");
|
||||
}
|
||||
|
||||
/**
|
||||
* Since the Closure Compiler treats ES6 classes as @struct rather than @dict by default,
|
||||
|
|
@ -1062,4 +1064,4 @@ if (!Function.prototype.bind) {
|
|||
};
|
||||
}
|
||||
|
||||
module.exports = Component;
|
||||
if (NODE) module.exports = Component;
|
||||
|
|
|
|||
|
|
@ -28,8 +28,10 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
var Str = require("../../shared/es6/strlib");
|
||||
var Component = require("../../shared/es6/component");
|
||||
if (NODE) {
|
||||
var Str = require("../../shared/es6/strlib");
|
||||
var Component = require("../../shared/es6/component");
|
||||
}
|
||||
|
||||
/**
|
||||
* Debugger Address Object
|
||||
|
|
@ -699,4 +701,4 @@ if (DEBUGGER) {
|
|||
|
||||
} // endif DEBUGGER
|
||||
|
||||
module.exports = Debugger;
|
||||
if (NODE) module.exports = Debugger;
|
||||
|
|
|
|||
|
|
@ -239,4 +239,4 @@ DiskAPI.ATTR = {
|
|||
ARCHIVE: 0x20 // PC-DOS 2.0 and up
|
||||
};
|
||||
|
||||
module.exports = DiskAPI;
|
||||
if (NODE) module.exports = DiskAPI;
|
||||
|
|
|
|||
|
|
@ -82,4 +82,4 @@ var DumpAPI = {
|
|||
DumpAPI.asDiskCommands = [DumpAPI.QUERY.DIR, DumpAPI.QUERY.DISK, DumpAPI.QUERY.PATH];
|
||||
DumpAPI.asFileCommands = [DumpAPI.QUERY.FILE];
|
||||
|
||||
module.exports = DumpAPI;
|
||||
if (NODE) module.exports = DumpAPI;
|
||||
|
|
|
|||
|
|
@ -28,9 +28,11 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
var Str = require("../../shared/es6/strlib");
|
||||
var Web = require("../../shared/es6/weblib");
|
||||
var Component = require("../../shared/es6/component");
|
||||
if (NODE) {
|
||||
var Str = require("../../shared/es6/strlib");
|
||||
var Web = require("../../shared/es6/weblib");
|
||||
var Component = require("../../shared/es6/component");
|
||||
}
|
||||
|
||||
/*
|
||||
* We now support asynchronous XML and XSL file loads; simply set fAsync (below) to true.
|
||||
|
|
|
|||
|
|
@ -248,4 +248,4 @@ Keys.SHIFTED_KEYCODES[Keys.KEYCODE.FF_DASH] = Keys.ASCII['_'];
|
|||
Keys.SHIFTED_KEYCODES[Keys.KEYCODE.FF_EQUALS] = Keys.ASCII['+'];
|
||||
Keys.SHIFTED_KEYCODES[Keys.KEYCODE.FF_SEMI] = Keys.ASCII[':'];
|
||||
|
||||
module.exports = Keys;
|
||||
if (NODE) module.exports = Keys;
|
||||
|
|
|
|||
|
|
@ -28,11 +28,13 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
var fs = require("fs");
|
||||
var http = require("http");
|
||||
var path = require("path");
|
||||
var url = require("url");
|
||||
var Str = require("../../shared/es6/strlib");
|
||||
if (NODE) {
|
||||
var fs = require("fs");
|
||||
var http = require("http");
|
||||
var path = require("path");
|
||||
var url = require("url");
|
||||
var Str = require("../../shared/es6/strlib");
|
||||
}
|
||||
|
||||
class Net {
|
||||
/**
|
||||
|
|
@ -389,4 +391,4 @@ Net.REVEAL_PDFS = "pdfs";
|
|||
Net.asPropagate = [Net.GORT_COMMAND, "autostart"];
|
||||
Net.sServerRoot = null;
|
||||
|
||||
module.exports = Net;
|
||||
if (NODE) module.exports = Net;
|
||||
|
|
|
|||
|
|
@ -84,4 +84,4 @@ class Proc {
|
|||
}
|
||||
}
|
||||
|
||||
module.exports = Proc;
|
||||
if (NODE) module.exports = Proc;
|
||||
|
|
|
|||
|
|
@ -46,4 +46,4 @@ var ReportAPI = {
|
|||
}
|
||||
};
|
||||
|
||||
module.exports = ReportAPI;
|
||||
if (NODE) module.exports = ReportAPI;
|
||||
|
|
|
|||
|
|
@ -392,4 +392,4 @@ class State {
|
|||
}
|
||||
}
|
||||
|
||||
module.exports = State;
|
||||
if (NODE) module.exports = State;
|
||||
|
|
|
|||
|
|
@ -632,4 +632,4 @@ Str.TYPES = {
|
|||
ARRAY: 8
|
||||
};
|
||||
|
||||
module.exports = Str;
|
||||
if (NODE) module.exports = Str;
|
||||
|
|
|
|||
|
|
@ -65,4 +65,4 @@ var UserAPI = {
|
|||
}
|
||||
};
|
||||
|
||||
module.exports = UserAPI;
|
||||
if (NODE) module.exports = UserAPI;
|
||||
|
|
|
|||
|
|
@ -321,4 +321,4 @@ Usr.asDays = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday",
|
|||
Usr.asMonths = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
|
||||
Usr.aMonthDays = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
||||
|
||||
module.exports = Usr;
|
||||
if (NODE) module.exports = Usr;
|
||||
|
|
|
|||
|
|
@ -28,8 +28,10 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
var Component = require("../../shared/es6/component");
|
||||
var ReportAPI = require("../../shared/es6/reportapi");
|
||||
if (NODE) {
|
||||
var Component = require("../../shared/es6/component");
|
||||
var ReportAPI = require("../../shared/es6/reportapi");
|
||||
}
|
||||
|
||||
/*
|
||||
* According to http://www.w3schools.com/jsref/jsref_obj_global.asp, these are the *global* properties
|
||||
|
|
@ -1011,4 +1013,4 @@ Web.onPageEvent(Web.isUserAgent("Opera") || Web.isUserAgent("iOS")? 'onunload' :
|
|||
Web.doPageEvent(Web.aPageEventHandlers['exit']);
|
||||
});
|
||||
|
||||
module.exports = Web;
|
||||
if (NODE) module.exports = Web;
|
||||
|
|
|
|||
|
|
@ -38,7 +38,6 @@ if (NODE) {
|
|||
var http = require("http");
|
||||
var path = require("path");
|
||||
var url = require("url");
|
||||
var str = require("./strlib");
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -347,10 +346,6 @@ net.getResource = function(sURL, dataPost, fAsync, done)
|
|||
if (!sServerRoot) {
|
||||
sServerRoot = path.join(path.dirname(fs.realpathSync(__filename)), "../../../");
|
||||
}
|
||||
/*
|
||||
* TODO: Revisit why we pass back sBaseName instead of the original sURL....
|
||||
*/
|
||||
var sBaseName = str.getBaseName(sURL);
|
||||
var sFile = path.join(sServerRoot, sURL);
|
||||
if (fAsync) {
|
||||
fs.readFile(sFile, {encoding: "utf8"}, function(err, s) {
|
||||
|
|
@ -361,7 +356,7 @@ net.getResource = function(sURL, dataPost, fAsync, done)
|
|||
sResource = s;
|
||||
nErrorCode = 0;
|
||||
}
|
||||
if (done) done(sBaseName, sResource, nErrorCode);
|
||||
if (done) done(sURL, sResource, nErrorCode);
|
||||
});
|
||||
} else {
|
||||
try {
|
||||
|
|
@ -373,7 +368,7 @@ net.getResource = function(sURL, dataPost, fAsync, done)
|
|||
*/
|
||||
console.log(err.message);
|
||||
}
|
||||
if (done) done(sBaseName, sResource, nErrorCode);
|
||||
if (done) done(sURL, sResource, nErrorCode);
|
||||
response = [sResource, nErrorCode];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue