Closed esteblock closed 11 months ago
Working on this branch: https://github.com/mauroepce/soroban-react/tree/soroban-documentation Tasks done:
jsdoc.json
I was going to start to work on the documentation and I've encountered a problem in the index.tsx file in the package "chains" with references to FUTURENET and SANDBOX in SorobanClient.Networks. When trying to reference these networks I get the following errors:
Property 'FUTURENET' does not exist on type 'typeof Networks'
Property 'SANDBOX' does not exist on type 'typeof Networks'
I've searched the documentation and repository of "soroban-client" but haven't found any mention of FUTURENET or SANDBOX that can help me solve this problem.
I opened an issue in the "soroban-client" repository to help me solve the FUTURENET and SANDBOX problem.
Here is the link to the issue: https://github.com/stellar/js-soroban-client/issues/104
I'll still continue with the documentation and then I'll do the code modifications.
I filled in the comments for the documentation of the index.tsx
code inside the package chain
.
The only problem I'm having is that the script isn't recognizing comments inside .tsx
files inside packages. Pending to be resolved.
Had a problem trying to run prettier on any tsx file. The warnings were as follows:
[warn] jsxBracketSameLine is deprecated
.[warn] Ignored unknown option { importOrder: ["react", "<THIRD_PARTY_MODULES>", "components/*", "app/*|config/*|interfaces/*|stories/*", "^[./ ]"] }
.[warn] Ignored unknown option { importOrderSeparation: true }
I solved doing the following in the .prettierrc
config file:
@trivago/prettier-plugin-sort-imports
was not installed. Now i'ts workingAditional:
There was an error in multiples files inside package's folder:
Cannot find module '@soroban-react/[package]' or its corresponding type declarations.ts(2307)
. What was causing this:
Solved doing the following:
{
"extends": "@tsconfig/recommended/tsconfig.json",
"compilerOptions": {
"module": "CommonJS",
"declaration": true,
"moduleResolution": "Node",
"baseUrl": ".",
"paths": {
"@soroban-react/*": ["packages/*/src"]
}
},
"exclude": ["**/*.spec.ts"]
}
This tells TypeScript to look in the "packages/*/src" directory when an import starts with "@soroban-react/", resolving the import error.
I was having too much problems with JSDoc to create the documentation. JSDoc was still having trouble understanding the TypeScript/JSX code it's trying to parse. I think it may be because:
Solution:
Documentation generation with TYPEDOC, ready
Script Summary:
/packages
. Documentation Generation:
Updates to the README.md file on the root directory:
Today I was focused on being able to publish to gitbook the documentation generated by typedoc and combined with additional folders added to the docs folder.
updates:
currently the automatically generated documentation is being stored in a new folder called Technical-docs
in the path docs/Technical-docs
Additionally, the new folder structure is as follows: . ├── docs │ ├── Technical-docs │ │ ├── interfaces │ │ ├── modules │ │ └── README.md │ ├── Tutorial │ │ └── README.md │ ├── README.md │ └── SUMMARY.md
Updated and summarized documentation of what the soroban-react library does as well as key features and the most important utilities and components was added.
Issues:
Technical-docs
Solution: I'm looking at using the .gitbook.yaml to create the structure or using a SUMMARY.md within the docs.
Close because will update doc in a new issue
Write in the ./docs folder. Gitbook: https://soroban-react.gitbook.io/