Download dependencies.
pnpm install
Build TypeScript files.
pnpm run build
Delete built files.
pnpm run clean
Run unit tests. Testing files are located at __tests__
folder in each package.
pnpm test
Lint TypeScript and JavaScript files.
pnpm run lint
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.
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.
Please follow Conventional Commits.
We use Prettier to format all the code.