Skip to content

Generate API Docs locally

praneesha edited this page Jun 28, 2022 · 3 revisions

Follow the steps below to generate API Docs locally.

Note: The instructions below are tested for Swan Lake Beta.

  1. Do your change(s) in the repositories below.

    • Standard library modules: In the master branch of the respective repository of the module (e.g., module-ballerina-time for the time module)
    • Lang library modules: In the master branch of the ballerina-lang repository
  2. Build the module repo or the ballerina-lang repo by executing the command below.

    ./gradlew clean build publishToMavenLocal -x test -x check --no-build-cache

  3. Change the appended timestamp to SNAPSHOT in the gradle.properties file in ballerina-distribution repo.

    E.g., If you changed the time module, change the below.

    stdlibTimeVersion=2.0.0-beta.1-20210528-223700-397e4d0 to stdlibTimeVersion=2.0.0-beta.1-SNAPSHOT

    Note: Make sure the version in the module’s gradle.properties file matches the entry you make in the gradle.properties file of the ballerina-distribution repo. Both should be the same.

  4. Build the ballerina-distribution repo by executing the command below.

    ./gradlew clean build -x test -x check

    Note: If you are building the <ballerina-distribution> repo for the first time, execute the commands below.

    • export packageUser=<Your github username>
    • export packagePAT=<Your personal access token>
  5. Extract the pack built in the <ballerina-distribution>/ballerina/build/distributions directory.

  6. Double click on the /docs/index.html file, and verify your fixes in the simulated view of the API Docs in Central.

  7. Send the PR to the repos below, and get it merged.

Clone this wiki locally