Skip to content

Commit fb497e7

Browse files
committed
fix: sort standalone entries after adding help.ts for correct alphabetical order
1 parent 8a83a6e commit fb497e7

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

docs/src/content/docs/contributing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ cli/
6565
│ │ ├── trace/ # list, view, logs
6666
│ │ ├── trial/ # list, start
6767
│ │ ├── api.ts # Make an authenticated API request
68+
│ │ ├── help.ts # Help command
6869
│ │ ├── init.ts # Initialize Sentry in your project (experimental)
69-
│ │ ├── schema.ts # Browse the Sentry API schema
70-
│ │ └── help.ts # Help command
70+
│ │ └── schema.ts # Browse the Sentry API schema
7171
│ ├── lib/ # Shared utilities
7272
│ └── types/ # TypeScript types and Zod schemas
7373
├── test/ # Test files (mirrors src/ structure)

script/generate-docs-sections.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,12 @@ function generateProjectStructure(allRoutes: RouteInfo[]): string {
149149
}
150150

151151
// Combine standalone commands with help.ts (which is in SKIP_ROUTES
152-
// for doc generation but still exists in the filesystem)
152+
// for doc generation but still exists in the filesystem).
153+
// Add help before sorting so it lands in correct alphabetical position.
153154
const allStandaloneEntries: { name: string; brief: string }[] =
154155
standalones.map((r) => ({ name: r.name, brief: r.commands[0].brief }));
155156
allStandaloneEntries.push({ name: "help", brief: "Help command" });
157+
allStandaloneEntries.sort((a, b) => a.name.localeCompare(b.name));
156158

157159
// Render standalone command files
158160
for (let i = 0; i < allStandaloneEntries.length; i += 1) {

0 commit comments

Comments
 (0)