You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
loader/editor-build.js

36 lines
693 B
JavaScript

import { Builder } from '/loader/builder.js'
export class EditorBuild {
deps = [
'/editor/file-group.js',
'/editor/file-view.js',
'/editor/text-edit.js',
'/editor/app.js',
'/forms/button-group.js',
'/dialog/dialog.js',
'/menu/dropdown.js',
]
constructor() {
this.files = undefined
}
async loadFiles() {
const files = []
for (const name of this.deps) {
const resp = await fetch(name)
files.push({
name,
data: await resp.text(),
})
}
}
async build() {
if (this.files === undefined) {
await this.loadFiles()
}
const builder = new Builder(this.files)
return builder.build()
}
}