statigen
Version:
A static site generator that supports html, ejs, and markdown source files
39 lines (38 loc) • 1.13 kB
TypeScript
import { Project } from './Project';
export declare class StaticSiteGenerator {
project: Project;
run(options: Options): Promise<unknown>;
private createProject;
private build;
private watcher;
/**
* A handle for the watch mode interval that keeps the process alive.
* We need this so we can clear it if the builder is disposed
*/
private watchInterval;
private watch;
destroy(): Promise<void>;
}
export interface Options {
/**
* The directory where the tool should run
*/
cwd?: string;
/**
* The path to the directory containing the source files
*/
sourceDir: string;
/**
* The path to the directory where the output files should be written
*/
outDir?: string;
/**
* An array of file paths or globs of the files that should be included in the build.
* These must be relative to sourceDir
*/
files?: string[];
/**
* If true, the program will run in watch mode and re-build on every change. This also starts a web server and links livereload to the served pages.
*/
watch?: boolean;
}