Starting the project environment
###Starting-the-project
Before you start, make sure you have the following installed on your machine: - Quarto - Node.js - Yarn or NPM - Typescript (optional - Only required if the files you’re working with are in typescript)
Steps
Environment Setup Refer to environment setup guide for more details See here
-
For cases where you are working with a project that uses typescript, you will need to compile the typescript files to javascript. To do this, run the following command in the terminal:
bash tsc -b
Make sure to direct the transpiled files to the correct directory. You can do this by updating the
tsconfig.json
file to include theoutDir
property. For example:json { "compilerOptions": { "outDir": "./dist" } }
-
Start the project
bash yarn run build
OR
npm run build
This command will command will generate the documentation and also start a local quarto server. You can access the documentation by visiting the http link shown on your terminal.
Make changes to the documentation and see the changes reflect on the browser.
Once you are done, you can stop the server by pressing
Ctrl + C
on your terminal.-
To generate the documentation without starting the server, run the following command:
bash npm run doc:generate
OR
yarn run doc:generate
9: To preview the documentation without starting the server, run the following command:
bash npm run doc:preview
OR
yarn run doc:preview
This command will startup a quarto server to preview the already generated documentation and open it in your default browser.
-
To clean the generated documentation, run the following command:
bash npm run doc:clean
OR
yarn run doc:clean
This command will delete the generated documentation files. Note that this command will not delete the
/tutorials
or `/source_files directory or wherever the tutorials and source_files are stored. Only the generated documentation files will be deleted.
You can specify the source files path by including the --source
flag in the command. For example:
npm run build --source=./path/to/source_files
OR
yarn run build --source=./path/to/source_files
You can also specify the tutorials path by including the --tutorial
flag in the command. For example:
npm run build --tutorials=./path/to/tutorials
Summary of commands: - npm run build
- Generate the documentation and start a local quarto server - yarn run build
- Generate the documentation and start a local quarto server - npm run doc:generate
- Generate the documentation without starting the server - yarn run doc:generate
- Generate the documentation without starting the server - npm run doc:preview
- Preview the generated documentation without starting the server - yarn run doc:preview
- Preview the generated documentation without starting the server - npm run doc:clean
- Delete the generated documentation files - yarn run doc:clean
- Delete the generated documentation files
Tags - --source
- Specify the source files path - --tutorial
- Specify the tutorials path