Skip to main content
Module

x/aleph/project.ts>Project

The Full-stack Framework in Deno.
Very Popular
Go to Latest
class Project
import { Project } from "https://deno.land/x/aleph@v0.2.21/project.ts";

A Project to manage the Aleph.js appliaction. core functions include:

  • compile source code
  • manage deps
  • apply plugins
  • map page/API routes
  • watch file changes
  • call APIs
  • SSR/SSG

Constructors

new
Project(
appDir: string,
mode: "development" | "production",
reload?,
)

Properties

readonly
appRoot: string
readonly
buildDir
readonly
config: Readonly<Required<Config>> & { __file?: string; }
readonly
importMap: Readonly<{ imports: Record<string, string>; }>
readonly
isDev
readonly
mode: "development" | "production"
readonly
ready: Promise<void>
readonly
srcDir

Methods

private
_compile(url: string, options?: { forceCompile?: boolean; forceTarget?: string; })
private
_createMainModule(): Promise<Module>
private
_getRouteModule(unnamed 0: Module): RouteModule
private
_init(reload: boolean)
private
_loadConfig()
private
_lookupDeps(
moduleID: string,
__deps?: Dep[],
__tracing?: Set<string>,
)
private
_moduleFromURL(url: string): Module
private
_renderPage(loc: { pathname: string; search?: string; })
private
_resolveImportURL(importer: Module, url: string): string
private
_updateDependency(
depPath: string,
depHash: string,
callback: (mod: Module) => void,
tracing?,
)
private
_watch()

build the application to a static site(SSG)

callAPI(req: ServerRequest, loc: { pathname: string; search?: string; }): Promise<APIHandler | null>
getModule(id: string): Module | null
getModuleByPath(pathname: string): Module | null
getPageHtml(loc: { pathname: string; search?: string; }): Promise<[number, string, Record<string, string> | null]>
getSSRData(loc: { pathname: string; search?: string; }): Promise<[number, any]>
isHMRable(moduleID: string)
isSSRable(pathname: string): boolean