Skip to content

Latest commit

 

History

History
102 lines (68 loc) · 1.81 KB

CONTRIBUTING.md

File metadata and controls

102 lines (68 loc) · 1.81 KB

Contributing

Getting Started

Download dependencies.

pnpm install

Developing

Build TypeScript files.

pnpm run build

Delete built files.

pnpm run clean

Testing

Run unit tests. Testing files are located at __tests__ folder in each package.

pnpm test

Linting

Lint TypeScript and JavaScript files.

pnpm run lint

Adding a New CRD Package

Create a new CRD package.

pnpm run new-crd-package \
  --name 'pkg-name' \
  --description 'Package description' \
  --author 'John Doe <[email protected]>'

Update workspaces.

pnpm install

Add input paths to crd-generate.input in package.json.

{
  "crd-generate": {
    "input": [
      // Download CRD from a URL
      "https://example.com/manifest.yaml",
      // Or use a local file.
      "./path/to/file.yaml"
    ],
    "output": "./gen"
  }
}

Build TypeScript files.

pnpm run build

Finally, add a README.md and tests. Please follow other CRD packages mentioned in readme.

Changeset

Run the command below and follow the instructions to create a changeset. A changeset should describes packages that have been modified and change information. These information will be added to the changelog once packages are released.

If you're creating a new CRD package using new-crd-package script, a changeset will be created automatically, so you can skip this step.

pnpm changeset

For more information, see using changesets.

Style Guides

Git Commit Messages

Please follow Conventional Commits.

Code Formatting

We use Prettier to format all the code.