Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(contributing) add a guide on adding js packages #2629

Merged
merged 2 commits into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/lerna.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
types: [closed]
paths:
- 'packages/**'
- 'docs/**'
branches:
- master

Expand Down
4 changes: 4 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ Contributions should roughly follow the [uber style guide](https://github.com/ub

<!-- todo: more-->

## Adding a new JS/TS Package

If you need to make a new JS/TS package, here are the steps to follow:

## 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.
Expand Down
2 changes: 1 addition & 1 deletion docs/bridge/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This website is built using [Docusaurus](https://docusaurus.io/), a modern stati

## Generating API Docs

<!--TODO: needs to be done from ci to ensure regenration is done-->
<!--TODO: needs to be done from ci to ensure regenration is done.-->
Copy link
Contributor

@coderabbitai coderabbitai bot May 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: Automate documentation regeneration in CI.

Would you like assistance in setting up a GitHub Action to automate the regeneration of API docs as mentioned in the TODO?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@trajan0x, great! Here's a draft for a GitHub Action that automates the regeneration of API docs whenever changes are made to the docs directory. You can add this job to your existing .github/workflows/lerna.yaml file:

name: Lerna Workflow

on:
  push:
    branches:
      - master
    paths:
      - 'docs/**'
  pull_request:
    branches:
      - master
    paths:
      - 'docs/**'

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Set up Node.js
        uses: actions/setup-node@v2
        with:
          node-version: '14'
      - name: Install dependencies
        run: yarn install
      - name: Build
        run: yarn build

  regenerate-api-docs:
    runs-on: ubuntu-latest
    needs: build
    steps:
      - uses: actions/checkout@v2
      - name: Set up Node.js
        uses: actions/setup-node@v2
        with:
          node-version: '14'
      - name: Install dependencies
        run: yarn install
      - name: Regenerate API Documentation
        run: yarn docusaurus gen-api-docs all

This configuration adds a new job regenerate-api-docs that depends on the build job. It ensures that the API documentation is regenerated only after a successful build. The regenerate-api-docs job sets up the environment, installs dependencies, and runs the command to regenerate the API docs.

You can add this job to your workflow file by appending it under the jobs section. Let me know if you need any more help with this setup!

`yarn docusaurus gen-api-docs all`:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding a period at the end of the command line for clarity.

- `yarn docusaurus gen-api-docs all`:
+ `yarn docusaurus gen-api-docs all`.

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
`yarn docusaurus gen-api-docs all`:
`yarn docusaurus gen-api-docs all`.


### Installation
Expand Down
Loading