jsquarto
v1.0.0
Published
Generate JS package API reference documentation using Markdown and Quarto. JSquarto is designed as an alternative to JSDoc
Downloads
2
Readme
Testing Your Tool Locally
Prerequisites
Before testing the tool locally, ensure you have the following prerequisites installed on your system:
- Quarto
- Node.js and npm (Node Package Manager)
- Git (optional, if cloning the repository)
Installation
To test the tool locally, follow these steps:
Clone the repository:
git clone https://github.com/Open-Science-Community-Saudi-Arabia/JSquarto
Navigate to the projecte directory
Install dependencies
npm install
Running the Tool
Once the dependencies are installed, you can paste the files in the JS files or folder in the /source_files
directory you can run the tool using the following command
To generate the documentation run the following command
npm run doc:generate --source=<path to source files> --tutorial=<path to tutorials>
This will extract the JSDoc comments from the js files and write them to their corresponding Quarto Markdown files.
If the
--source
and--tutorial
flags are not provided, the tool will use the default source files and tutorials in the/source_files
and/tutorials
directories respectively.The generated
.qmd
files can be found in the/docs/chapters
folderTo preview the generated documentation run
npm run doc:preview
The docs are previewed with quarto, so make sure to have quarto already installed
You can choose to generate and preview in one go, to do this run the command below
npm run build
This will generate the documentation, preview with quarto and open a link to preview the docs
For more information on how to integrate translation tools like Crowdin with JSquarto, refer to the Documentation.
For more details on using JSquarto and to see an example of the generated documentation, visit the JSQuarto documentation