fix missing let. change code injection api
This commit is contained in:
parent
842f2b4ee0
commit
b147427f07
3 changed files with 15 additions and 16 deletions
|
|
@ -1,5 +1,5 @@
|
|||
var exports = {
|
||||
COPYRIGHT:"Copyright (C) 2014-2019 Stewart Allen <sa@grid.space> - All Rights Reserved",
|
||||
COPYRIGHT:"Copyright (C) Stewart Allen <sa@grid.space> - All Rights Reserved",
|
||||
LICENSE:"See the license.md file included with the source distribution",
|
||||
VERSION:"1.7.2"
|
||||
};
|
||||
|
|
|
|||
|
|
@ -444,7 +444,7 @@ let gs_moto_space = exports;
|
|||
if (platformClick) {
|
||||
let vis = platform.visible;
|
||||
platform.visible = true;
|
||||
int = intersect([platform], false);
|
||||
let int = intersect([platform], false);
|
||||
platform.visible = vis;
|
||||
platformClickAt = int && int.length > 0 ? int[0].point : null;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1007,11 +1007,12 @@ function initModule(file, dir) {
|
|||
require(file)({
|
||||
api: api,
|
||||
const: {
|
||||
script: script,
|
||||
rootdir: currentDir,
|
||||
moddir: dir,
|
||||
args: args,
|
||||
debug: debug
|
||||
debug: debug,
|
||||
script: script,
|
||||
moddir: dir,
|
||||
rootdir: currentDir,
|
||||
version: ver.VERSION
|
||||
},
|
||||
pkg: {
|
||||
agent,
|
||||
|
|
@ -1033,14 +1034,12 @@ function initModule(file, dir) {
|
|||
api: db,
|
||||
level: level
|
||||
},
|
||||
inject: {
|
||||
kiri: (file, options) => {
|
||||
let opt = options || {};
|
||||
if (opt.end) {
|
||||
script.kiri.push(dir + "/" + file);
|
||||
} else {
|
||||
script.kiri.splice(0, 0, dir + "/" + file);
|
||||
}
|
||||
inject: (code, file, options) => {
|
||||
let opt = options || {};
|
||||
if (opt.end) {
|
||||
script[code].push(dir + "/" + file);
|
||||
} else {
|
||||
script[code].splice(0, 0, dir + "/" + file);
|
||||
}
|
||||
},
|
||||
path: {
|
||||
|
|
@ -1237,12 +1236,12 @@ modPaths.forEach(fn => {
|
|||
|
||||
// add the rest of the handler chain
|
||||
handler.use(fullpath({
|
||||
"/meta/index.html" : redir("/meta/"),
|
||||
"/kiri/index.html" : redir("/kiri/"),
|
||||
"/kiri" : redir("/kiri/"),
|
||||
"/kiri/" : remap("/kiri/index.html"),
|
||||
"/meta/index.html" : redir("/meta/"),
|
||||
"/meta" : redir("/meta/"),
|
||||
"/meta/" : remap("/meta/index.html"),
|
||||
"/kiri/" : remap("/kiri/index.html")
|
||||
"/meta/" : remap("/meta/index.html")
|
||||
}))
|
||||
.use(prepath([
|
||||
[ "/space", redir("/meta/")],
|
||||
|
|
|
|||
Loading…
Reference in a new issue