From c133d21095148b457ae402c402db843065994f57 Mon Sep 17 00:00:00 2001 From: Trajan0x Date: Mon, 13 May 2024 12:04:13 +0100 Subject: [PATCH] docs(contributing) add a guide on adding js packages --- .github/workflows/lerna.yaml | 1 + CONTRIBUTING.md | 12 ++++++++++++ docs/bridge/README.md | 2 +- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lerna.yaml b/.github/workflows/lerna.yaml index f60abc2a58..db37434f7d 100644 --- a/.github/workflows/lerna.yaml +++ b/.github/workflows/lerna.yaml @@ -4,6 +4,7 @@ on: types: [closed] paths: - 'packages/**' + - 'docs/**' branches: - master diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ab83227cef..ccd63da131 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,6 +4,18 @@ Contributions should roughly follow the [uber style guide](https://github.com/ub +## Adding a new JS/TS Package + +If you need to make a new JS/TS package, here are the steps to follow: + + - If adding under `packages/*`, no need to do anything further. + - Otherwise, make sure you add the package to: + - `.github/workflows/lerna.yml` under paths. This will make sure that the package is built and tested in CI. + - `workspaces.packages` in packages.json. This will make sure that the package is built and tested locally. + - `lerna.json` under `packages` and `version` fields. This will make sure that the package is versioned correctly. + - If the package is a library that you'd like to publish, simply set the `private` field in `package.json` to `false` and the `publishConfig` access to public. + - If the package is a UI, please see [here](./.github/workflows/ui-preview.md) for instructions on configuring vercel. Make sure to update the paths there as well. + ## Linting Linting for go is used using [golangci-lint](https://golangci-lint.run/) at the latest released version. Please upgrade or install using your package manager. and run `make lint` from your desired module. diff --git a/docs/bridge/README.md b/docs/bridge/README.md index bd07455576..76d817110e 100644 --- a/docs/bridge/README.md +++ b/docs/bridge/README.md @@ -4,7 +4,7 @@ This website is built using [Docusaurus](https://docusaurus.io/), a modern stati ## Generating API Docs - + `yarn docusaurus gen-api-docs all`: ### Installation