@@ -132,18 +132,18 @@ export const docs = create_docs();
132
132
133
133
export const examples = index . examples . children ;
134
134
135
- function getSectionPriority ( path : string ) : number {
135
+ function getDocumentationSectionPriority ( path : string ) : number {
136
136
if ( path . includes ( '/docs/svelte/' ) ) return 0 ;
137
137
if ( path . includes ( '/docs/kit/' ) ) return 1 ;
138
138
if ( path . includes ( '/docs/cli/' ) ) return 2 ;
139
139
return 3 ;
140
140
}
141
141
142
- export function sortPaths ( paths : string [ ] ) : string [ ] {
142
+ export function sortDocumentationPaths ( paths : string [ ] ) : string [ ] {
143
143
return paths . sort ( ( a , b ) => {
144
144
// First compare by section priority
145
- const priorityA = getSectionPriority ( a ) ;
146
- const priorityB = getSectionPriority ( b ) ;
145
+ const priorityA = getDocumentationSectionPriority ( a ) ;
146
+ const priorityB = getDocumentationSectionPriority ( b ) ;
147
147
if ( priorityA !== priorityB ) return priorityA - priorityB ;
148
148
149
149
// Get directory paths
@@ -274,7 +274,7 @@ function minimizeContent(content: string, options?: Partial<MinimizeOptions>): s
274
274
return minimized ;
275
275
}
276
276
277
- function shouldIncludeFile ( filename : string , ignore : string [ ] = [ ] ) : boolean {
277
+ function shouldIncludeFileLlmDocs ( filename : string , ignore : string [ ] = [ ] ) : boolean {
278
278
const shouldIgnore = ignore . some ( ( pattern ) => minimatch ( filename , pattern ) ) ;
279
279
if ( shouldIgnore ) {
280
280
if ( dev ) console . log ( `❌ Ignored by pattern: ${ filename } ` ) ;
@@ -284,16 +284,16 @@ function shouldIncludeFile(filename: string, ignore: string[] = []): boolean {
284
284
return true ;
285
285
}
286
286
287
- interface GenerateContentOptions {
287
+ interface GenerateLlmContentOptions {
288
288
prefix ?: string ;
289
289
ignore ?: string [ ] ;
290
290
minimize ?: Partial < MinimizeOptions > ;
291
291
package ?: Package ;
292
292
}
293
293
294
- export function generateContent (
294
+ export function generateLlmContent (
295
295
docs : Record < string , string > ,
296
- options : GenerateContentOptions = { }
296
+ options : GenerateLlmContentOptions = { }
297
297
) : string {
298
298
const { prefix, ignore = [ ] , minimize : minimizeOptions , package : pkg } = options ;
299
299
@@ -303,10 +303,10 @@ export function generateContent(
303
303
}
304
304
305
305
let currentSection = '' ;
306
- const paths = sortPaths ( Object . keys ( docs ) ) ;
306
+ const paths = sortDocumentationPaths ( Object . keys ( docs ) ) ;
307
307
308
308
for ( const path of paths ) {
309
- if ( ! shouldIncludeFile ( path , ignore ) ) continue ;
309
+ if ( ! shouldIncludeFileLlmDocs ( path , ignore ) ) continue ;
310
310
311
311
// If a specific package is provided, only include its docs
312
312
if ( pkg ) {
0 commit comments