Skip to content

Commit 22bbf6d

Browse files
committed
Modify the bundle specific documentations
1 parent d87b95c commit 22bbf6d

File tree

4 files changed

+26
-43
lines changed

4 files changed

+26
-43
lines changed

docs/src/lib/dev/devdocs.data.ts

Lines changed: 0 additions & 28 deletions
This file was deleted.

docs/src/lib/dev/index.md

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,6 @@
22
title: Modules Developer Docs
33
---
44

5-
<script setup>
6-
import { data } from './devdocs.data.ts'
7-
</script>
5+
# Modules Developer Documentation
86

9-
<h1>Bundles Developer Documentation</h1>
10-
<p>This the index page for bundles that have documentation intended for developers working with them</p>
11-
<ul>
12-
<li v-for="doc of data">
13-
<a :href="doc.url">{{ doc.frontmatter.title }}</a>
14-
</li>
15-
</ul>
7+
Refer to the sidebar to see the list of modules that have developer documentation available.

docs/src/modules/2-bundle/5-documentation/2-dev.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ If you have more complex documentation needs, you can follow the instructions in
3333

3434
### 2. As a collection of Markdown files located [here](../../../lib/dev):
3535

36-
Within the `dev` folder, markdown files are collated and displayed in the index page. Each
37-
markdown file/folder structure represents a separate bundle.
36+
Within the `dev` folder, each markdown file/folder structure represents a separate bundle.
3837

3938
For example:
4039
```dirtree
@@ -53,12 +52,31 @@ children:
5352
comment: Add your own bundle's documentation!
5453
```
5554

55+
You can of course use a directory structure as well:
56+
```dirtree
57+
name: dev
58+
children:
59+
- name: index.md
60+
comment: Index Page
61+
62+
- name: curve.md
63+
comment: Documentation for the curve bundle
64+
65+
- name: game.md
66+
comment: Documentation for the game bundle
67+
68+
- name: your_bundle
69+
children:
70+
- index.md
71+
- docs.md
72+
```
73+
5674
### 3. Throughout Your Code
5775

5876
Especially when your bundle intentionally breaks conventions or rules, or when you need to do
5977
something unconventional, you should leave comments in your source code detailing why.
6078

61-
For example, the `communication` bundle uses the `mqtt` bundle but doesn't use its main
79+
In the example below, the `communication` bundle uses the `mqtt` bundle but doesn't use its main
6280
export. The comment explains why the alternate import is being used.
6381
```ts
6482
import { connect, type MqttClient, type QoS } from 'mqtt/dist/mqtt';

eslint.config.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import markdown from '@eslint/markdown';
66
import saLintPlugin from '@sourceacademy/lint-plugin';
77
import stylePlugin from '@stylistic/eslint-plugin';
88
import vitestPlugin from '@vitest/eslint-plugin';
9+
import { defineConfig } from 'eslint/config';
910
import * as importPlugin from 'eslint-plugin-import';
1011
import jsdocPlugin from 'eslint-plugin-jsdoc';
1112
import * as mdx from 'eslint-plugin-mdx';
@@ -19,7 +20,7 @@ import tseslint from 'typescript-eslint';
1920
const todoTreeKeywordsWarning = ['TODO', 'TODOS', 'TODO WIP', 'FIXME', 'WIP'];
2021
const todoTreeKeywordsAll = [...todoTreeKeywordsWarning, 'NOTE', 'NOTES', 'LIST'];
2122

22-
export default tseslint.config(
23+
export default defineConfig(
2324
{
2425
name: 'Global Ignores',
2526
ignores: [
@@ -57,7 +58,6 @@ export default tseslint.config(
5758
}),
5859
language: 'markdown/gfm',
5960
languageOptions: {
60-
// @ts-expect-error typescript eslint doesn't recognize this property
6161
frontmatter: 'yaml'
6262
},
6363
plugins: { markdown },
@@ -95,6 +95,7 @@ export default tseslint.config(
9595
extends: [ymlPlugin.configs['flat/recommended']],
9696
files: ['**/*.yml', '**/*.yaml'],
9797
plugins: {
98+
// @ts-expect-error yml plugin causes errors
9899
yml: ymlPlugin
99100
},
100101
rules: {

0 commit comments

Comments
 (0)