Compare commits
No commits in common. 'pages' and 'main' have entirely different histories.
@ -1,3 +1,3 @@
|
||||
# loader
|
||||
|
||||
loader: builds content to load in a frame and set up sandbox and CSP
|
||||
loader: loads content in a frame and sets up sandbox and CSP
|
||||
@ -1,40 +0,0 @@
|
||||
import { Builder } from "/loader/builder.js"
|
||||
|
||||
export class EditorBuild {
|
||||
deps = [
|
||||
'forms/button-group.js',
|
||||
'dialog/dialog.js',
|
||||
'menu/dropdown.js',
|
||||
'editor/header.js',
|
||||
'editor/file-group.js',
|
||||
'editor/file-view.js',
|
||||
'editor/text-edit.js',
|
||||
'editor/code-edit.js',
|
||||
'loader/builder.js',
|
||||
'editor/app.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(),
|
||||
})
|
||||
}
|
||||
this.files = files
|
||||
}
|
||||
|
||||
async build() {
|
||||
if (this.files === undefined) {
|
||||
await this.loadFiles()
|
||||
}
|
||||
const builder = new Builder(this.files)
|
||||
return builder.build()
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue