an ability to require modules using "./" and "../" syntax
This commit is contained in:
parent
7d0c2d079b
commit
26edf60654
6 changed files with 60 additions and 8 deletions
3
test/inner/dependency.js
Normal file
3
test/inner/dependency.js
Normal file
|
@ -0,0 +1,3 @@
|
|||
mimicry.module(function () {
|
||||
return "Dep";
|
||||
})
|
6
test/inner/inner.js
Normal file
6
test/inner/inner.js
Normal file
|
@ -0,0 +1,6 @@
|
|||
mimicry.module([
|
||||
"./dependency",
|
||||
"../outer"
|
||||
], function (global, [dependency, outer]) {
|
||||
return dependency === "Dep" && outer === "Outer";
|
||||
})
|
|
@ -4,8 +4,9 @@ mimicry.module([
|
|||
"simple", Mimicry.Type.json,
|
||||
"background", Mimicry.Type.css,
|
||||
"text", Mimicry.Type.text,
|
||||
"binary", Mimicry.Type.binary
|
||||
], function (global, [terminalModule, simple, background, text, binary]) {
|
||||
"binary", Mimicry.Type.binary,
|
||||
"inner/inner"
|
||||
], function (global, [terminalModule, simple, background, text, binary, inner]) {
|
||||
let bnr = false;
|
||||
if (binary instanceof ArrayBuffer) {
|
||||
const view = new Uint8Array(binary);
|
||||
|
@ -27,6 +28,7 @@ mimicry.module([
|
|||
terminalModule === "terminal",
|
||||
simple.a[4] === 115,
|
||||
text === "Lorem ipsum, I guess",
|
||||
bnr
|
||||
bnr,
|
||||
inner === true
|
||||
];
|
||||
});
|
3
test/outer.js
Normal file
3
test/outer.js
Normal file
|
@ -0,0 +1,3 @@
|
|||
mimicry.module(function () {
|
||||
return "Outer";
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue