Skip to content

Commit

Permalink
chore: testing lefthook
Browse files Browse the repository at this point in the history
  • Loading branch information
lmammino committed Mar 21, 2024
1 parent 2708afe commit 3c50bb0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -434,4 +434,4 @@ You can contribute just by submitting bugs or suggesting improvements by

## License

Licensed under [MIT License](LICENSE). © Luciano Mammino.
Licensed under [MIT License](LICENSE). © Luciano Mammino.
4 changes: 2 additions & 2 deletions lefthook.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pre-commit:
parallel: true
commands:
updateReadme:
files: "src/openapi.yml scripts/updateReadme.ts"
update-readme:
glob: "{src/openapi.yml,scripts/updateReadme.ts}"
run: pnpm run update-readme
2 changes: 1 addition & 1 deletion scripts/updateReadme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const docs = stdout
.replace(/^## /g, '### ')
.replace(/^# /g, '## ')

const newContent = `${before}<!-- openapi -->\n${docs}\n<!-- openapi -->\n${after}`
const newContent = `${before}<!-- openapi -->\n${docs}\n<!-- openapi -->\n${after.trimEnd()}`
await writeFile(readmePath, newContent)

console.log('Updated README.md')

0 comments on commit 3c50bb0

Please sign in to comment.