Initial work of ESM transformation
This commit is contained in:
parent
2472c9cff2
commit
b8205a63aa
303 changed files with 1959 additions and 2450 deletions
|
@ -1,29 +0,0 @@
|
|||
"use strict";
|
||||
|
||||
exports.GlyphBlock = class GlyphBlock {
|
||||
constructor(capture, blockName, body) {
|
||||
this.capture = capture;
|
||||
this.blockName = blockName;
|
||||
this.body = body;
|
||||
|
||||
this.resolved = false;
|
||||
this.exports = {};
|
||||
}
|
||||
resolve() {
|
||||
if (this.resolved) return this.exports;
|
||||
this.resolved = true;
|
||||
|
||||
const pendingApplications = [];
|
||||
const ExportCapture = fnObj => {
|
||||
pendingApplications.push(() => {
|
||||
for (const [k, v] of Object.entries(fnObj())) {
|
||||
this.exports[k] = v;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
this.body(this.capture, ExportCapture);
|
||||
for (const f of pendingApplications) f();
|
||||
return this.exports;
|
||||
}
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue