Plugins
oneRepo features a plugin interface to enable shared and reusable commands and functionality into the one
command-line interface.
Featured plugins
Section titled Featured plugins Docgen Generate Markdown documentation for the oneRepo CLI in your repository.
ESLint Run ESLint across your repo.
Jest Run Jest tests across your repo.
Performance Writer Example plugin for monitoring performance of commands run in your repository.
Prettier Format files with Preggier.
TypeScript Automatically sync tsconfig project references and run tsc through the oneRepo CLI.
Vitest Run Vitest tests across your repo.
Writing plugins
Section titled Writing pluginsPlugins are objects comprised of three possible hooks.
Key | Type | Description |
---|---|---|
startup | (argv) => Promise<void> | <void> | Run a function before any and all commands, after argument parsing. |
shutdown | (argv) => Promise<void> | <void> | Run a function after any and all commands, after argument parsing. |
yargs | (yargs, visitor) => Yargs | A function that is given the CLI’s Yargs instance. Useful for adding custom commands and middleware. |