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"
|
2020-02-20 18:06:50 +01:00
|
|
|
import * as standardcomponents from "@budibase/standard-components/src/index"
|
|
|
|
|
2020-02-25 16:21:23 +01:00
|
|
|
export default async () => {
|
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"] = {
|
2020-02-20 18:06:50 +01:00
|
|
|
rootComponent: rootComponent(window),
|
2020-02-12 13:32:46 +01:00
|
|
|
}
|
2020-02-20 18:06:50 +01:00
|
|
|
componentLibraries["@budibase/standard-components"] = standardcomponents
|
2020-02-03 10:24:25 +01:00
|
|
|
const appDef = { hierarchy: {}, actions: {} }
|
|
|
|
const user = { name: "yeo", permissions: [] }
|
2020-06-12 21:42:55 +02:00
|
|
|
const { initialisePage } = createApp(componentLibraries, {}, appDef, user, {})
|
2020-02-12 13:32:46 +01:00
|
|
|
return initialisePage
|
2020-02-20 18:06:50 +01:00
|
|
|
}
|