ecmarkup
Version:
Custom element definitions and core utilities for markup that specifies ECMAScript and related technologies.
18 lines (17 loc) • 622 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.Boilerplate = void 0;
exports.build = build;
const Spec_1 = require("./Spec");
const utils = require("./utils");
const prex_1 = require("prex");
class Boilerplate {
}
exports.Boilerplate = Boilerplate;
async function build(path, fetch, opts, token = prex_1.CancellationToken.none) {
const html = await fetch(path, token);
const dom = utils.htmlToDom(html);
const spec = new Spec_1.default(path, fetch, dom, opts !== null && opts !== void 0 ? opts : {}, /*sourceText*/ html, token);
await spec.build();
return spec;
}
;