mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-02-06 15:04:58 +00:00
Update app.js
This commit is contained in:
parent
62626df60e
commit
23b8eb233e
7
app.js
7
app.js
|
@ -160,6 +160,7 @@ function include(FN) {
|
|||
*/
|
||||
function require(FN) {
|
||||
var cache = require.__cache__ = require.__cache__ || {};
|
||||
|
||||
if (FN.substr(FN.length - 3) !== '.js') FN += ".js";
|
||||
if (cache[FN]) return cache[FN];
|
||||
|
||||
|
@ -168,7 +169,7 @@ function require(FN) {
|
|||
var __dirname__ = require.__getDirName__(__filename__);
|
||||
var T = require.__load__(FN);
|
||||
|
||||
// make function
|
||||
// build
|
||||
T = "(function(global){var module=new require.__ModuleObject__();return(function(exports,require,module,__filename,__dirname){"
|
||||
+ '"use strict";'
|
||||
+ T
|
||||
|
@ -176,14 +177,14 @@ function require(FN) {
|
|||
+ FN
|
||||
;
|
||||
|
||||
// execute function
|
||||
// execute
|
||||
try {
|
||||
cache[FN] = eval(T);
|
||||
} catch (e) {
|
||||
console.error("PARSE ERROR!", e.number, ",", e.description, ", FN=", FN);
|
||||
}
|
||||
|
||||
// check is it exists VERSIONINFO
|
||||
// print VERSIONINFO
|
||||
if (typeof(cache[FN]) === "object") {
|
||||
if ("VERSIONINFO" in cache[FN]) console.log(cache[FN].VERSIONINFO);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user