feat: add build.outDir option (#1797)

This commit is contained in:
Marvin Hagemeister
2023-09-20 10:40:09 +02:00
committed by GitHub
parent ff6ae7eb7f
commit 3fd8fe89d3
30 changed files with 846 additions and 448 deletions
+41
View File
@@ -1,18 +1,59 @@
import { ComponentChildren, ComponentType, VNode } from "preact";
import * as router from "./router.ts";
import { InnerRenderFunction, RenderContext } from "./render.ts";
import { Manifest } from "./mod.ts";
export interface DenoConfig {
imports?: Record<string, string>;
importMap?: string;
tasks?: Record<string, string>;
lint?: {
rules: { tags?: string[] };
exclude?: string[];
};
fmt?: {
exclude?: string[];
};
exclude?: string[];
compilerOptions?: {
jsx?: string;
jsxImportSource?: string;
};
}
// --- APPLICATION CONFIGURATION ---
export type StartOptions = Partial<Deno.ServeTlsOptions> & FreshOptions;
export interface FreshOptions {
build?: {
/**
* The directory to write generated files to when `dev.ts build` is run.
* This can be an absolute path, a file URL or a relative path.
*/
outDir?: string;
};
render?: RenderFunction;
plugins?: Plugin[];
staticDir?: string;
router?: RouterOptions;
}
export interface InternalFreshOptions {
dev: boolean;
loadSnapshot: boolean;
denoJsonPath: string;
denoJson: DenoConfig;
manifest: Manifest;
build: {
outDir: string;
};
render?: RenderFunction;
plugins: Plugin[];
staticDir: string;
router?: RouterOptions;
}
export interface RouterOptions {
/**
* Controls whether Fresh will append a trailing slash to the URL.