0.0.1-RC.0 • Published 4 months ago
@enhance/loader v0.0.1-RC.0
!WARNING
This work is in progress!
WIP: @enhance/app-loader
"Loader"
goals
mainly:
Provide a full, pre-loaded config for @enhance/app-core
.
That's routes (from api and pages) and elements from from elements (mjs and html) and components.
also...
- be the bridge between a server env (like
arc-plugin-enhance
) and "Core" - more easily tested
- defaults to the well-established Enhance app file structure
- though, not concerned with
head
orpreflight
- though, not concerned with
- be performant as possible
- promises help to defer work until needed
- good IntelliSense
next
- page tag names aren't 1:1 with current implementation
samples
the gist in an Arc handler...
import arc from '@architect/functions'
import loadAppConfig from '@enhance/app-loader'
import createEnhanceApp from '@enhance/app-core'
const basePath = process.cwd()
const appConfig = await loadAppConfig({ basePath })
const app = createEnhanceApp(appConfig)
export const handler = arc.http.bind(app.routeAndRender)
this ☝️ is very minimal. check out test/mocks for a more complete Arc example and a vanilla Node.js http
example.
0.1.0-alpha.0
4 months ago
0.0.1-RC.2
4 months ago
0.0.1-RC.3
4 months ago
0.0.1-RC.1
4 months ago
0.0.1-RC.0
4 months ago