mirror of
https://github.com/oven-sh/bun
synced 2026-02-17 14:22:01 +00:00
engine -> app
This commit is contained in:
@@ -2,7 +2,7 @@ import { FileBlob, ServeOptions, Server } from "bun";
|
||||
|
||||
import { BuildManifest, BuildOptions, BuildResult, BundlerOptions, LazyBuildResult } from "./bun-bundler";
|
||||
|
||||
interface EngineOptions extends BuildOptions {
|
||||
interface AppOptions extends BuildOptions {
|
||||
build?: boolean; // disable building/bundling
|
||||
serve?: Array<
|
||||
| {
|
||||
@@ -18,8 +18,8 @@ interface EngineOptions extends BuildOptions {
|
||||
>;
|
||||
}
|
||||
|
||||
export declare class Engine {
|
||||
constructor(options: EngineOptions | (EngineOptions | undefined)[]);
|
||||
export declare class App {
|
||||
constructor(options: AppOptions | (AppOptions | undefined)[]);
|
||||
// start dev server
|
||||
serve(options: Partial<ServeOptions>): Promise<Server>;
|
||||
// run full build
|
||||
@@ -37,7 +37,7 @@ export declare class Engine {
|
||||
|
||||
// simple static file server
|
||||
{
|
||||
const server = new Engine([
|
||||
const server = new App([
|
||||
{
|
||||
name: "static server",
|
||||
// disable all buildling
|
||||
@@ -73,7 +73,7 @@ export declare class Engine {
|
||||
* return new Response("hello world");
|
||||
* }
|
||||
*/
|
||||
const app = new Engine([
|
||||
const app = new App([
|
||||
{
|
||||
name: "simple HTTP server",
|
||||
target: "bun",
|
||||
@@ -118,7 +118,7 @@ export declare class Engine {
|
||||
style: "nextjs",
|
||||
});
|
||||
|
||||
const app = new Engine([
|
||||
const app = new App([
|
||||
{
|
||||
name: "SSR'd react, pages dir",
|
||||
target: "bun",
|
||||
@@ -124,7 +124,7 @@ export interface BuildOptions extends BundlerOptions {
|
||||
manifest?: boolean;
|
||||
|
||||
// inputs
|
||||
entrypoints: string[];
|
||||
entrypoints?: string[];
|
||||
rootDir?: string; // equiv. outbase
|
||||
|
||||
naming?:
|
||||
|
||||
Reference in New Issue
Block a user