2020-02-03 10:24:25 +01:00
|
|
|
import { createApp } from "@budibase/client/src/createApp"
|
|
|
|
import components from "./testComponents"
|
|
|
|
import packageJson from "../../package.json"
|
2020-02-12 13:32:46 +01:00
|
|
|
import { rootComponent } from "./rootComponent"
|
|
|
|
export default async props => {
|
2020-02-03 10:24:25 +01:00
|
|
|
delete components._lib
|
|
|
|
const componentLibraries = {}
|
|
|
|
componentLibraries[packageJson.name] = components
|
2020-02-12 13:32:46 +01:00
|
|
|
componentLibraries["testcomponents"] = {
|
|
|
|
rootComponent: rootComponent(window)
|
|
|
|
}
|
2020-02-03 10:24:25 +01:00
|
|
|
const appDef = { hierarchy: {}, actions: {} }
|
|
|
|
const user = { name: "yeo", permissions: [] }
|
2020-02-12 13:32:46 +01:00
|
|
|
const { initialisePage } = createApp(
|
|
|
|
window.document,
|
|
|
|
componentLibraries,
|
|
|
|
{ appRootPath: "" },
|
|
|
|
appDef,
|
|
|
|
user,
|
|
|
|
{},
|
|
|
|
[]
|
|
|
|
)
|
|
|
|
return initialisePage
|
|
|
|
}
|