lerna-command-toc
lerna command for generate toc of packages in markdown
- Input (
README.md
)
# my-package
## Packages
## Other
- Output (After run
lerna toc
)
# my-package
## Packages
- [package-a](packages/a) - a description
- [package-b](packages/b) - b description
## Other
Installation
npm install lerna-command-toc lerna-cli -D
# or use yarn
yarn add lerna-command-toc lerna-cli --dev
Usage
lerna.json
{
"extendCommands": ["lerna-command-toc"],
"command": {
"toc": {}
}
}
- Run command
lerna toc --help
lerna toc
- We recommend use
lerna-command-toc
withpre-comment
git hook
// package.json
{
husky: {
hooks: {
'pre-commit': 'npx lerna toc && git add README.md'
}
}
}
Contributing
- Fork it!
- Create your new branch:
git checkout -b feature-new
orgit checkout -b fix-which-bug
- Start your magic work now
- Make sure npm test passes
- Commit your changes:
git commit -am 'feat: some description (close #123)'
orgit commit -am 'fix: some description (fix #123)'
- Push to the branch:
git push
- Submit a pull request :)
Authors
This library is written and maintained by imcuttle, imcuttle@163.com.
License
MIT - imcuttle