File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed
Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -12,11 +12,6 @@ output = output.replace(
1212 '' ,
1313)
1414
15- const readmePath = join ( '..' , '..' , 'README.md' )
16- const readme = await readFile ( readmePath , 'utf-8' )
17-
18- let updatedReadme = readme . replace ( / (?< = < ! - - U S A G E S T A R T - - > \n \n ` ` ` \n ) [ \s \S ] * ?(? = ` ` ` \n \n < ! - - U S A G E E N D - - > ) / , output )
19-
2015const codemods = TRANSFORM_OPTIONS . map ( ( { value, description, version } ) => {
2116 return `### ${ value . replaceAll ( '-' , ' ' ) } (v${ version } )
2217
@@ -25,6 +20,11 @@ ${description}
2520`
2621} ) . join ( '' )
2722
28- updatedReadme = updatedReadme . replace ( / (?< = < ! - - C O D E M O D S S T A R T - - > \n \n ) [ \s \S ] * ?(? = < ! - - C O D E M O D S E N D - - > ) / , codemods )
23+ const readmePath = join ( '..' , '..' , 'README.md' )
24+ const readme = await readFile ( readmePath , 'utf-8' )
25+
26+ const updatedReadme = readme
27+ . replace ( / (?< = < ! - - U S A G E S T A R T - - > \n \n ` ` ` \n ) [ \s \S ] * ?(? = ` ` ` \n \n < ! - - U S A G E E N D - - > ) / , output )
28+ . replace ( / (?< = < ! - - C O D E M O D S S T A R T - - > \n \n ) [ \s \S ] * ?(? = < ! - - C O D E M O D S E N D - - > ) / , codemods )
2929
3030await writeFile ( readmePath , updatedReadme , 'utf-8' )
Original file line number Diff line number Diff line change 11name : Generate dynamic README
22
33on :
4+ workflow_dispatch :
45 push :
56 branches :
67 - main
You can’t perform that action at this time.
0 commit comments