Skip to content

Commit 2ef20e9

Browse files
Merge branch 'main' of github.com:team-dev-docs/devdocsprod-dev-docs
2 parents 3d30461 + 43940fd commit 2ef20e9

23 files changed

+316
-0
lines changed

.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
2+
3+
# How to Use the "Populate External Docs" Command in VSCode Extension
4+
5+
## Step 1: Install and Set Up the Extension
6+
7+
Ensure you have the Dev-Docs VSCode extension installed and properly configured.
8+
9+
## Step 2: Locate the Command
10+
11+
1. Open the Command Palette in VSCode (Cmd+Shift+P on Mac or Ctrl+Shift+P on Windows/Linux).
12+
2. Type "Dev-Docs: Generate External Docs" to find the command.
13+
14+
## Step 3: Run the Command
15+
16+
Execute the command by selecting it from the Command Palette.
17+
18+
## Step 4: Customize Generation with dev-docs.json
19+
20+
To customize the generation process, you need to modify the `dev-docs.json` file in your project root.
21+
22+
1. Open `dev-docs.json` in your project.
23+
2. Look for the `ai` section, which controls the AI-based documentation generation.
24+
25+
Example structure:
26+
27+
```json
28+
{
29+
"ai": {
30+
"externalDocPrompt": "Custom prompt for external documentation",
31+
"docPath": "docs",
32+
"branch": "main",
33+
"merge": true,
34+
"components": {
35+
"template": "path/to/component/template.md"
36+
}
37+
}
38+
}
39+
```
40+
41+
## Key Customization Options
42+
43+
1. `externalDocPrompt`: Customize the AI prompt for generating external docs.
44+
2. `docPath`: Specify the directory where external docs will be saved.
45+
3. `branch`: Set the Git branch for committing generated docs.
46+
4. `merge`: Enable/disable merging of documentation for multiple symbols in a file.
47+
5. `components`: Define custom MDX components for documentation.
48+
49+
## Step 5: Generate Documentation
50+
51+
After customizing `dev-docs.json`, run the "Populate External Docs" command again. The extension will use your settings to generate and save the documentation to a branch of your documentation repo tied to Dev-Docs.
52+
53+
54+
55+
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
2+
3+
# How to Use and Customize the "Populate External Docs" Command in the VS Code Extension
4+
5+
## Step 1: Access the Command
6+
7+
1. Open your VS Code workspace
8+
2. Press `Cmd+Shift+P` (Mac) or `Ctrl+Shift+P` (Windows/Linux) to open the command palette
9+
3. Type "Populate External Docs" and select the command
10+
11+
12+
## Step 2: Customizing Generation with dev-docs.json
13+
14+
To customize the documentation generation, modify the `dev-docs.json` file in your project root:
15+
16+
1. Create or open `dev-docs.json`
17+
2. Add an `ai` object with customization options
18+
19+
Example `dev-docs.json`:
20+
21+
```json
22+
{
23+
"ai": {
24+
"internalTypeFilters": ["class", "method", "function"],
25+
"codeFilters": [],
26+
"nameFilters": [],
27+
"docSubFolder": "api/",
28+
"merge": true,
29+
"externalDocPrompt": "Generate comprehensive API documentation"
30+
}
31+
}
32+
```
33+
34+
Key customization options:
35+
36+
- `internalTypeFilters`: Specify which code elements to document
37+
- `docSubFolder`: Set the output folder for generated docs
38+
- `merge`: Combine multiple elements into a single document
39+
- `externalDocPrompt`: Customize the AI prompt for doc generation
40+
41+
The `generateBySymbols` function in `src/AiServices.ts` uses these settings to generate documentation.
42+
43+
## Step 3: Review and Edit
44+
45+
After running the command:
46+
47+
1. Check the `docs` folder (or your specified `docSubFolder`) for generated files
48+
2. Review and edit the generated content as needed
49+
3. Commit changes to your repository
50+
51+
By following these steps and customizing the `dev-docs.json`, you can efficiently generate and manage external documentation for your project using the VS Code extension.
52+
53+
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
3+
# How generate an OpenAPI file from your server code
4+
5+
This guide will walk you through using generating an OpenAPI file from your server code using a keyboard shortcut.
6+
7+
## Step 1: Locate the Relevant Code
8+
9+
Find a codefile that owns your server logic, for example a `server.js`.
10+
11+
## Step 2: Using the Command
12+
13+
1. Open your server file containing API routes.
14+
2. Press Shift+Cmd+A (Mac) or Shift+Ctrl+A (Windows/Linux).
15+
3. The extension will automatically:
16+
- Parse your code for API routes
17+
- Generate a Postman collection
18+
- Convert it to an OpenAPI specification
19+
20+
21+
22+

Generate codebase docs.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
2+
3+
# How to Use the "Generate Documentation" Command in Dev-Docs VSCode Extension
4+
5+
## Using the Command
6+
7+
### From the Context Menu
8+
9+
1. Right-click in your code file.
10+
2. Select "Generate Documentation" from the context menu.
11+
12+
### Using the Shortcut
13+
14+
- On Mac: Press `Shift + Command + D`
15+
- On Windows/Linux: Press `Shift + Ctrl + D`
16+
17+
## Customizing AI Generation
18+
19+
To customize the AI generation of the "Generate Documentation" command, you can modify the `dev-docs.json` file in your project root.
20+
21+
1. Open `dev-docs.json` in your project root.
22+
2. Locate the `ai` section in the JSON.
23+
3. Customize the following properties:
24+
25+
```json
26+
{
27+
"ai": {
28+
"internalTypeFilters": ["class", "method", "function"],
29+
"codeFilters": ["async function", "export default"],
30+
"nameFilters": ["handleSubmit", "render"],
31+
"contextPrompt": "your custom prompt or path to prompt template",
32+
"defaultLength": "3-5 Sentences"
33+
}
34+
}
35+
```
36+
37+
### Key Properties:
38+
39+
- `internalTypeFilters`: Array of symbol types to include in documentation.
40+
- `codeFilters`: Array of code patterns to filter for documentation.
41+
- `nameFilters`: Array of function or method names to specifically target.
42+
- `contextPrompt`: Custom prompt for AI generation or path to a prompt template file.
43+
- `defaultLength`: Desired length of generated documentation.
44+
45+
By adjusting these properties, you can fine-tune the AI-generated documentation to better suit your project's needs.
46+
47+
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
2+
3+
## Generate High Level Context on a Specific Folder
4+
5+
## Step 1: Access Folder Context Menu
6+
7+
Right-click on the desired folder and select the "Generate context for folder" option.
8+
9+
![image for /img/generate_high_level_context_on_a_specific_folder/step_1](/img/generate_high_level_context_on_a_specific_folder/step_1.png)
10+
11+
## Step 2: Review Generated Context
12+
13+
Navigate to the generated high-level context for the selected folder. You will find a summary of the folder's purpose and functionality.
14+
15+
![image for /img/generate_high_level_context_on_a_specific_folder/step_2](/img/generate_high_level_context_on_a_specific_folder/step_2.png)
16+
17+
The generated context will include:
18+
19+
- Last updated timestamp
20+
- Purpose of the folder
21+
- High-level overview of the folder's contents and functionality
22+
- Specific features or components present in the folder (e.g., Image Background Removal, Sprite Generation)
23+
- Details about test files and their purposes
24+
25+
This high-level context provides a quick understanding of the folder's contents and helps in navigating complex project structures.
26+
27+

docs/Use the intro feature.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
2+
3+
## Step 1: Locate the Command Palette
4+
5+
Find the relevant command from the command palette to begin using the intro feature.
6+
7+
![image for /img/use_the_intro_feature/step_1](/img/use_the_intro_feature/step_1.png)
8+
9+
## Step 2: Explore the File Structure
10+
11+
Navigate through the file structure in the Explorer view to familiarize yourself with the project layout.
12+
13+
![image for /img/use_the_intro_feature/step_2](/img/use_the_intro_feature/step_2.png)
14+
15+
## Step 3: Examine the Project Files
16+
17+
Review the contents of the project files, including JavaScript, Markdown, and configuration files.
18+
19+
![image for /img/use_the_intro_feature/step_3](/img/use_the_intro_feature/step_3.png)
20+
21+
## Step 4: Analyze the Main JavaScript File
22+
23+
Study the main JavaScript file, which contains important functions and logic for the project.
24+
25+
![image for /img/use_the_intro_feature/step_4](/img/use_the_intro_feature/step_4.png)
26+
27+
## Step 5: Understand the Sprite Generation Function
28+
29+
Examine the `generateSprite` function, which is responsible for creating sprite animations.
30+
31+
![image for /img/use_the_intro_feature/step_5](/img/use_the_intro_feature/step_5.png)
32+
33+
## Step 6: Review the DALL-E Integration
34+
35+
Look at how the DALL-E API is integrated into the sprite generation process.
36+
37+
![image for /img/use_the_intro_feature/step_6](/img/use_the_intro_feature/step_6.png)
38+
39+
## Step 7: Explore Additional Functionality
40+
41+
Investigate other functions and features within the project, such as file saving and image processing.
42+
43+
![image for /img/use_the_intro_feature/step_7](/img/use_the_intro_feature/step_7.png)
44+
45+
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
2+
3+
## Step 1: Locate the Code File
4+
5+
Find the code file you want to generate context for in your development environment.
6+
7+
![image for /img/generate_context_on_a_codefile/step_1](/img/generate_context_on_a_codefile/step_1.png)
8+
## Step 2: Open the Context Menu
9+
10+
Right-click on the code file to open the context menu.
11+
12+
![image for /img/generate_context_on_a_codefile/step_2](/img/generate_context_on_a_codefile/step_2.png)
13+
## Step 3: Access the Dev-Docs Submenu
14+
15+
In the context menu, find and hover over the "dev-docs" submenu.
16+
17+
![image for /img/generate_context_on_a_codefile/step_3](/img/generate_context_on_a_codefile/step_3.png)
18+
## Step 4: Select Generate Context Option
19+
20+
Click on the "Generate Context" option within the dev-docs submenu.
21+
22+
![image for /img/generate_context_on_a_codefile/step_4](/img/generate_context_on_a_codefile/step_4.png)
23+
## Step 5: View Generated Context File
24+
25+
A new file named "context-[filename].md" will appear in your file explorer.
26+
27+
![image for /img/generate_context_on_a_codefile/step_5](/img/generate_context_on_a_codefile/step_5.png)
28+
## Step 6: Review the Generated Context
29+
30+
Open the newly created markdown file to view the high-level overview of your code.
31+
32+
![image for /img/generate_context_on_a_codefile/step_6](/img/generate_context_on_a_codefile/step_6.png)
33+
## Step 7: Open the Dev-Docs editor
34+
35+
Right-click on the generated markdown file to open the markdown file in dev-docs editor.
36+
37+
![image for /img/generate_context_on_a_codefile/step_8](/img/generate_context_on_a_codefile/step_8.png)
38+
## Step 8: Examine the Context Details
39+
40+
Review the generated context, including the last update time, overview, main code object, and methods.
41+
42+
![image for /img/generate_context_on_a_codefile/step_7](/img/generate_context_on_a_codefile/step_7.png)
43+
44+
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
2+
3+
# Guide: Using the Dev-Docs Chrome Extension
4+
5+
## Step 1: Open the Extension
6+
7+
Open the dev-docs chrome extension by using the keyboard shortcut Shift + Command + U or by clicking on the extension icon in your browser. For Windows users, try clicking on the icon.
8+
9+
![image for /img/use_the_dev-docs_chrome_extension/step_3](/img/use_the_dev-docs_chrome_extension/step_3.png)
10+
11+
## Step 2: Interact with the UI
12+
13+
Navigate through the extension's user interface by clicking on various elements and exploring its features.
14+
15+
![image for /img/use_the_dev-docs_chrome_extension/step_1](/img/use_the_dev-docs_chrome_extension/step_1.png)
16+
17+
## Step 3: Complete the Capture
18+
19+
When you're finished interacting with the extension, open the Chrome extension menu and select the "Complete Capture" option to finalize your session.
20+
21+
![image for /img/use_the_dev-docs_chrome_extension/step_4](/img/use_the_dev-docs_chrome_extension/step_4.png)
22+
23+
319 KB
Loading
134 KB
Loading

0 commit comments

Comments
 (0)