docula 0.8.0 → 0.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/docula.d.ts CHANGED
@@ -1,6 +1,36 @@
1
- import type http from 'node:http';
2
- import { DoculaOptions } from './options.js';
3
- export default class Docula {
1
+ import http from 'node:http';
2
+
3
+ type DoculaSection = {
4
+ name: string;
5
+ order?: number;
6
+ path: string;
7
+ children?: DoculaSection[];
8
+ };
9
+
10
+ declare class DoculaOptions {
11
+ templatePath: string;
12
+ outputPath: string;
13
+ sitePath: string;
14
+ githubPath: string;
15
+ siteTitle: string;
16
+ siteDescription: string;
17
+ siteUrl: string;
18
+ port: number;
19
+ singlePage: boolean;
20
+ sections?: DoculaSection[];
21
+ constructor(options?: Record<string, unknown>);
22
+ parseOptions(options: Record<string, any>): void;
23
+ }
24
+
25
+ declare class DoculaHelpers {
26
+ createDoc(path: string, destination: string, frontMatter?: Record<string, string>, contentFunction?: (content: string) => string): void;
27
+ getFrontMatterFromFile(path: string): Record<string, string>;
28
+ getFrontMatter(content: string): Record<string, string>;
29
+ setFrontMatterToFile(path: string, frontMatter: Record<string, string>): void;
30
+ setFrontMatterInContent(content: string, frontMatter?: Record<string, string>): string;
31
+ }
32
+
33
+ declare class Docula {
4
34
  private _options;
5
35
  private readonly _console;
6
36
  private _configFileModule;
@@ -18,4 +48,5 @@ export default class Docula {
18
48
  loadConfigFile(sitePath: string): Promise<void>;
19
49
  serve(options: DoculaOptions): Promise<void>;
20
50
  }
21
- export { DoculaHelpers } from './helpers.js';
51
+
52
+ export { DoculaHelpers, Docula as default };