Skip to content

Commit cbab14a

Browse files
committed
docs: document the properties of the Fresh config
1 parent c72495f commit cbab14a

1 file changed

Lines changed: 18 additions & 1 deletion

File tree

src/config.ts

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,37 @@
11
import * as path from "@std/path";
22

33
export interface FreshConfig {
4+
/**
5+
* The root directory of the Fresh project.
6+
*
7+
* Other paths, such as `build.outDir`, `staticDir`, and `fsRoutes()`
8+
* are resolved relative to this directory.
9+
* @default Deno.cwd()
10+
*/
411
root?: string;
512
build?: {
613
/**
714
* The directory to write generated files to when `dev.ts build` is run.
15+
*
816
* This can be an absolute path, a file URL or a relative path.
17+
* Relative paths are resolved against the `root` option.
18+
* @default "_fresh"
919
*/
1020
outDir?: string;
1121
};
1222
/**
1323
* Serve fresh from a base path instead of from the root.
1424
* "/foo/bar" -> http://localhost:8000/foo/bar
15-
* @default {undefined}
25+
* @default undefined
1626
*/
1727
basePath?: string;
28+
/**
29+
* The directory to serve static files from.
30+
*
31+
* This can be an absolute path, a file URL or a relative path.
32+
* Relative paths are resolved against the `root` option.
33+
* @default "static"
34+
*/
1835
staticDir?: string;
1936
}
2037

0 commit comments

Comments
 (0)