@forsakringskassan/docs-generator 1.25.2 → 1.26.0

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.
@@ -88,7 +88,13 @@ export declare interface FileInfo {
88
88
  name: string;
89
89
  /** path relative to project root */
90
90
  fullPath: string;
91
- /** output filename or `false` to disable writing result to a file */
91
+ /**
92
+ * Output filename or `false` to disable writing result to a file.
93
+ *
94
+ * When passing a filename these optional placeholders can be used:
95
+ *
96
+ * - `[hash]` - replaced with the hash of the content body.
97
+ */
92
98
  outputName: string | false;
93
99
  }
94
100
 
@@ -132,6 +138,16 @@ declare class Generator_2 {
132
138
  * @param src - File or directory to copy.
133
139
  */
134
140
  copyResource(dst: string, src: string): void;
141
+ /**
142
+ * Generate a manifest listing all generated documents that will be present
143
+ * in `outputFolder`.
144
+ *
145
+ * Note: this only collects documents from the `generate-docs` stage,
146
+ * potential documents generated at later stages will not be present.
147
+ *
148
+ * @public
149
+ */
150
+ manifest(sourceFiles: SourceFiles[]): Promise<Manifest>;
135
151
  build(sourceFiles: SourceFiles[]): Promise<string[]>;
136
152
  /**
137
153
  * Start a development server hosting the generated documentation.
@@ -178,6 +194,45 @@ export declare interface GeneratorSiteOptions {
178
194
  */
179
195
  export declare function livereloadProcessor(options: ProcessorOptions): Processor;
180
196
 
197
+ /**
198
+ * @public
199
+ */
200
+ export declare interface Manifest {
201
+ pages: Array<{
202
+ path: string;
203
+ title: string;
204
+ outline: Array<{
205
+ heading: string;
206
+ anchor: string;
207
+ }>;
208
+ examples: Array<{
209
+ selector: string;
210
+ language: string;
211
+ tags: string[];
212
+ }>;
213
+ }>;
214
+ }
215
+
216
+ /**
217
+ * Write out a manifest listing all generated documents that will be present in
218
+ * `outputFolder`.
219
+ *
220
+ * @public
221
+ */
222
+ export declare function manifestProcessor(options: ManifestProcessorOptions): Processor;
223
+
224
+ /**
225
+ * Options for {@link manifestProcessor}.
226
+ *
227
+ * @public
228
+ */
229
+ export declare interface ManifestProcessorOptions {
230
+ /** If set, the manifest will be written as Markdown to this destination */
231
+ markdown?: string;
232
+ /** If set, the manifest will be written as JSON to this destination */
233
+ json?: string;
234
+ }
235
+
181
236
  /**
182
237
  * @public
183
238
  */