This commit is contained in:
Martin McKeaveney 2020-04-06 14:16:21 +01:00
parent fea50bb56e
commit c37cff7712
6 changed files with 24872 additions and 32173 deletions

View File

@ -1,5 +1,5 @@
const Koa = require("koa")
const router = require("./middleware/routes/builderRouter")
const router = require("./middleware/routers")
const koaBody = require("koa-body")
const initialiseRuntimePackages = require("./initialise/initialiseRuntimePackages")

View File

@ -0,0 +1,7 @@
{
"name": "newscreen",
"props": {
"_component": "@budibase/standard-component/div",
"className": "something else"
}
}

File diff suppressed because one or more lines are too long

View File

@ -1,2 +1,2 @@
window['##BUDIBASE_FRONTEND_DEFINITION##'] = {"componentLibraries":[{"importPath":"/lib/customComponents/index.js","libName":"./customComponents"},{"importPath":"/lib/moreCustomComponents/index.js","libName":"./moreCustomComponents"}],"appRootPath":"","page":{"title":"Test App","favicon":"./_shared/favicon.png","stylesheets":["my-styles.css"],"componentLibraries":["./customComponents","./moreCustomComponents"],"props":{"_component":"@budibase/standard-components/container","type":"div"}},"screens":[{"name":"screen1","description":"","props":{"_component":"@budibase/standard-components/container","className":"","type":"div"},"_css":"/css/d121e1ecc6cf44f433213222e9ff5d40.css"},{"name":"screen2","description":"","props":{"_component":"@budibase/standard-components/container","className":"","type":"div"},"_css":"/css/7b7c05b78e05c06eb8d69475caadfea3.css"}]};
window['##BUDIBASE_FRONTEND_DEFINITION##'] = {"componentLibraries":[{"importPath":"/lib/node_modules/@budibase/standard-components/dist/index.js","libName":"@budibase/standard-components"},{"importPath":"/lib/customComponents/index.js","libName":"./customComponents"},{"importPath":"/lib/moreCustomComponents/index.js","libName":"./moreCustomComponents"}],"appRootPath":"","page":{"title":"Test App","favicon":"./_shared/favicon.png","stylesheets":["my-styles.css"],"componentLibraries":["@budibase/standard-components","./customComponents","./moreCustomComponents"],"props":{"_component":"@budibase/standard-components/container","type":"div"}},"screens":[{"name":"screen1","description":"","props":{"_component":"@budibase/standard-components/container","className":"","type":"div"},"_css":"/css/d121e1ecc6cf44f433213222e9ff5d40.css"},{"name":"screen2","description":"","props":{"_component":"@budibase/standard-components/container","className":"","type":"div"},"_css":"/css/7b7c05b78e05c06eb8d69475caadfea3.css"}]};
window['##BUDIBASE_FRONTEND_FUNCTIONS##'] = {'1234':() => 'test return'}

View File

@ -6,14 +6,14 @@ const send = require("koa-send")
const routeHandlers = require("./routeHandlers")
const {
componentLibraryInfo,
} = require("../../utilities/builder")
} = require("../utilities/builder")
const {
componentRoutes,
appsRoutes,
pageRoutes,
userRoutes,
authenticatedRoutes
} = require("./");
} = require("./routes");
const builderPath = resolve(__dirname, "../../builder")
@ -86,6 +86,8 @@ module.exports = (config, app) => {
await next()
}
})
router
.get("/_builder", async ctx => {
await send(ctx, "/index.html", { root: builderPath })
})