Skip to main content

Authoring Plugins

Plugins provide a way to combine Tasks together in logical groupings. They can be configured to run in @checkup/cli as a whole plugin, or individually.

Generate a plugin

Plugins can be generated using the CLI's generate command.

npx checkup generate plugin <plugin-name>

This will generate the following structure:

โ”œโ”€โ”€ .eslintignore
โ”œโ”€โ”€ .eslintrc
โ”œโ”€โ”€ .gitignore
โ”œโ”€โ”€ .prettierrc.js
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ __tests__
โ”‚ย ย  โ””โ”€โ”€ .gitkeep
โ”œโ”€โ”€ jest.config.js
โ”œโ”€โ”€ package.json
โ”œโ”€โ”€ src
โ”‚ย ย  โ”œโ”€โ”€ index.ts
โ”‚ย ย  โ”œโ”€โ”€ results
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ .gitkeep
โ”‚ย ย  โ”œโ”€โ”€ tasks
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ .gitkeep
โ”‚ย ย  โ””โ”€โ”€ types
โ”‚ย ย  โ””โ”€โ”€ index.ts
โ”œโ”€โ”€ tsconfig.json
โ””โ”€โ”€ yarn.lock

Plugin commands

Build a plugin (TypeScript only)

yarn build

Or in watch mode:

yarn build:watch

Run tests

yarn test

Run linting

yarn lint

Generate plugin documentation

yarn docs:generate