Skip to content

Commit

Permalink
Merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
NateWilliams2 committed Mar 15, 2024
2 parents 5c7d770 + 840bb8e commit ef3d8cb
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,15 @@ yarn run re-gen

## Generate the SDK documentation

If you want to generate the SDK documentation for yourself, you can do so from the `vocdoni-sdk` project:
If you want to generate the SDK documentation for yourself, you can do so from the `vocdoni-sdk` project.
At the moment you may experience an running generating the following code which can be fixed by temporarily commenting-out this line in `vocdoni-sdk/tsconfig.json when running the typedoc generation script:
~~~json
// "rootDir": "./src",
~~~

~~~bash
npm install typedoc --save-dev
npx typedoc --plugin typedoc-plugin-markdown --categorizeByGroup --out docs
npx typedoc --plugin typedoc-plugin-markdown --categorizeByGroup --out reference
~~~

Then you can replace the SDK documentation folder in your developer portal directory:
Expand All @@ -55,13 +59,13 @@ Then you can replace the SDK documentation folder in your developer portal direc
# Delete existing SDK docs folder
rm -rf DEV_PORTAL_PATH/docs/sdk/reference
# Copy the new docs to the SDK folder
cp -R VOCDONI_SDK_PATH/docs/ DEV_PORTAL_PATH/docs/sdk/reference
cp -R VOCDONI_SDK_PATH/reference/ DEV_PORTAL_PATH/docs/sdk/reference
# Remove the autogenerated library readme (this is not necessary)
rm DEV_PORTAL_PATH/docs/sdk/reference/README.md
# Copy changelog file to SDK reference directory
cp VOCDONI_SDK_PATH/CHANGELOG.md DEV_PORTAL_PATH/docs/sdk/reference/changelog.md
# Remove the now redundant docs folder in vocdoni-sdk
rm -rf VOCDONI_SDK_PATH/docs
rm -rf VOCDONI_SDK_PATH/reference
# Clean-up the generated links to the readme file
# Note this command was run on MacOS, the sed command may need to be tweaked on a linux system
find DEV_PORTAL_PATH/docs/sdk/reference -type f | xargs sed -i '' -r 's/\[\@vocdoni\/sdk\]\((\.\.\/)*README\.md\)/\[\@vocdoni\/sdk\]\(\/sdk\)/g'
Expand Down

0 comments on commit ef3d8cb

Please sign in to comment.