@@ -19,7 +19,7 @@ const assets = import.meta.glob<string>(
1919 }
2020) ;
2121
22- export const documentsContent = import . meta. glob < string > ( '../../../content/**/*.md' , {
22+ export const documents_content = import . meta. glob < string > ( '../../../content/**/*.md' , {
2323 eager : true ,
2424 query : '?raw' ,
2525 import : 'default'
@@ -148,15 +148,15 @@ const DOCUMENTATION_NAMES: Record<string, string> = {
148148 cli : 'Svelte CLI'
149149} ;
150150
151- export function getDocumentationTitle ( type : string ) : string {
151+ export function get_documentation_title ( type : string ) : string {
152152 return `This is the developer documentation for ${ DOCUMENTATION_NAMES [ type ] } .` ;
153153}
154154
155- export function getDocumentationStartTitle ( type : string ) : string {
155+ export function get_documentation_start_title ( type : string ) : string {
156156 return `# Start of ${ DOCUMENTATION_NAMES [ type ] } documentation` ;
157157}
158158
159- export function filterDocsByPackage (
159+ export function filter_docs_by_package (
160160 allDocs : Record < string , string > ,
161161 type : string
162162) : Record < string , string > {
@@ -189,7 +189,7 @@ const defaultOptions: MinimizeOptions = {
189189 normalizeWhitespace : false
190190} ;
191191
192- function removeQuoteBlocks ( content : string , blockType : string ) : string {
192+ function remove_quote_blocks ( content : string , blockType : string ) : string {
193193 return content
194194 . split ( '\n' )
195195 . reduce ( ( acc : string [ ] , line : string , index : number , lines : string [ ] ) => {
@@ -212,22 +212,22 @@ function removeQuoteBlocks(content: string, blockType: string): string {
212212 . join ( '\n' ) ;
213213}
214214
215- function minimizeContent ( content : string , options ?: Partial < MinimizeOptions > ) : string {
215+ function minimize_content ( content : string , options ?: Partial < MinimizeOptions > ) : string {
216216 // Merge with defaults, but only for properties that are defined
217217 const settings : MinimizeOptions = options ? { ...defaultOptions , ...options } : defaultOptions ;
218218
219219 let minimized = content ;
220220
221221 if ( settings . removeLegacy ) {
222- minimized = removeQuoteBlocks ( minimized , 'LEGACY' ) ;
222+ minimized = remove_quote_blocks ( minimized , 'LEGACY' ) ;
223223 }
224224
225225 if ( settings . removeNoteBlocks ) {
226- minimized = removeQuoteBlocks ( minimized , 'NOTE' ) ;
226+ minimized = remove_quote_blocks ( minimized , 'NOTE' ) ;
227227 }
228228
229229 if ( settings . removeDetailsBlocks ) {
230- minimized = removeQuoteBlocks ( minimized , 'DETAILS' ) ;
230+ minimized = remove_quote_blocks ( minimized , 'DETAILS' ) ;
231231 }
232232
233233 if ( settings . removePlaygroundLinks ) {
@@ -251,7 +251,7 @@ function minimizeContent(content: string, options?: Partial<MinimizeOptions>): s
251251 return minimized ;
252252}
253253
254- function shouldIncludeFileLlmDocs ( filename : string , ignore : string [ ] = [ ] ) : boolean {
254+ function should_include_file_llm_docs ( filename : string , ignore : string [ ] = [ ] ) : boolean {
255255 const shouldIgnore = ignore . some ( ( pattern ) => minimatch ( filename , pattern ) ) ;
256256 if ( shouldIgnore ) {
257257 if ( dev ) console . log ( `❌ Ignored by pattern: ${ filename } ` ) ;
@@ -268,7 +268,7 @@ interface GenerateLlmContentOptions {
268268 package ?: string ;
269269}
270270
271- export function generateLlmContent (
271+ export function generate_llm_content (
272272 docs : Record < string , string > ,
273273 options : GenerateLlmContentOptions = { }
274274) : string {
@@ -280,10 +280,10 @@ export function generateLlmContent(
280280 }
281281
282282 let currentSection = '' ;
283- const paths = sortDocumentationPaths ( Object . keys ( docs ) ) ;
283+ const paths = sort_documentation_paths ( Object . keys ( docs ) ) ;
284284
285285 for ( const path of paths ) {
286- if ( ! shouldIncludeFileLlmDocs ( path , ignore ) ) continue ;
286+ if ( ! should_include_file_llm_docs ( path , ignore ) ) continue ;
287287
288288 // If a specific package is provided, only include its docs
289289 if ( pkg ) {
@@ -293,7 +293,7 @@ export function generateLlmContent(
293293 const docType = packages . find ( ( p ) => path . includes ( `/docs/${ p } /` ) ) ;
294294 if ( ! docType ) continue ;
295295
296- const section = getDocumentationStartTitle ( docType ) ;
296+ const section = get_documentation_start_title ( docType ) ;
297297 if ( section !== currentSection ) {
298298 if ( currentSection ) content += '\n' ;
299299 content += `${ section } \n\n` ;
@@ -302,26 +302,26 @@ export function generateLlmContent(
302302 }
303303
304304 content += `## ${ path . replace ( '../../../content/' , '' ) } \n\n` ;
305- const docContent = minimizeOptions ? minimizeContent ( docs [ path ] , minimizeOptions ) : docs [ path ] ;
305+ const docContent = minimizeOptions ? minimize_content ( docs [ path ] , minimizeOptions ) : docs [ path ] ;
306306 content += docContent ;
307307 content += '\n' ;
308308 }
309309
310310 return content ;
311311}
312312
313- function getDocumentationSectionPriority ( path : string ) : number {
313+ function get_documentation_section_priority ( path : string ) : number {
314314 if ( path . includes ( '/docs/svelte/' ) ) return 0 ;
315315 if ( path . includes ( '/docs/kit/' ) ) return 1 ;
316316 if ( path . includes ( '/docs/cli/' ) ) return 2 ;
317317 return 3 ;
318318}
319319
320- export function sortDocumentationPaths ( paths : string [ ] ) : string [ ] {
320+ export function sort_documentation_paths ( paths : string [ ] ) : string [ ] {
321321 return paths . sort ( ( a , b ) => {
322322 // First compare by section priority
323- const priorityA = getDocumentationSectionPriority ( a ) ;
324- const priorityB = getDocumentationSectionPriority ( b ) ;
323+ const priorityA = get_documentation_section_priority ( a ) ;
324+ const priorityB = get_documentation_section_priority ( b ) ;
325325 if ( priorityA !== priorityB ) return priorityA - priorityB ;
326326
327327 // Get directory paths
0 commit comments