@@ -12,7 +12,7 @@ async function addPathComments(rootDir: string) {
12
12
} ) ) {
13
13
const filePath = entry . path ;
14
14
const relPath = relative ( resolvedRoot , filePath ) ;
15
- const comment = `// ${ relPath } \n` ;
15
+ const comment = `<!-- ${ relPath } --> \n` ;
16
16
17
17
try {
18
18
const content = await Deno . readTextFile ( filePath ) ;
@@ -23,7 +23,7 @@ async function addPathComments(rootDir: string) {
23
23
}
24
24
25
25
const lines = content . split ( '\n' ) ;
26
- while ( lines . length > 0 && ( lines [ 0 ] . trim ( ) === '' || lines [ 0 ] . trim ( ) . startsWith ( '// ' ) ) ) {
26
+ while ( lines . length > 0 && ( lines [ 0 ] . trim ( ) === '' || lines [ 0 ] . trim ( ) . startsWith ( '<!-- ' ) ) ) {
27
27
lines . shift ( ) ;
28
28
}
29
29
@@ -33,7 +33,7 @@ async function addPathComments(rootDir: string) {
33
33
await Deno . writeTextFile ( filePath , newContent ) ;
34
34
console . log ( `Updated comment in ${ relPath } ` ) ;
35
35
} catch ( err ) {
36
- const error = err as Error
36
+ const error = err as Error ;
37
37
console . error ( `Error processing ${ relPath } : ${ error . message } ` ) ;
38
38
}
39
39
}
@@ -45,7 +45,7 @@ if (import.meta.main) {
45
45
await addPathComments ( rootDir ) ;
46
46
console . log ( 'Finished adding file path comments' ) ;
47
47
} catch ( err ) {
48
- const error = err as Error
48
+ const error = err as Error ;
49
49
console . error ( 'Error:' , error . message ) ;
50
50
Deno . exit ( 1 ) ;
51
51
}
0 commit comments