2 changed files with 118 additions and 38 deletions
@ -0,0 +1,36 @@ |
|||
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() |
|||
} |
|||
} |
|||
Loading…
Reference in new issue