imcuttle / lerna-command-toc

lerna cli with custom command extensions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

lerna-command-toc

Build status Test coverage NPM version NPM Downloads Prettier Conventional Commits

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 with pre-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 or git 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)' or git 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 🐟

About

lerna cli with custom command extensions

License:MIT License


Languages

Language:JavaScript 100.0%