Skip to content

Add more comments #1993

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 81 commits into from
Jun 3, 2025
Merged
Changes from 2 commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
61d9bfe
refactor: optimize file system operations by removing async/await for…
Bashamega Apr 23, 2025
7b92b7d
chore: better naming
Bashamega Apr 23, 2025
746f705
feat: extract summary from MDN comments for better documentation
Bashamega Apr 23, 2025
9521a10
generate
Bashamega Apr 23, 2025
a995e00
remove comments
Bashamega Apr 23, 2025
ca08f27
Remove hashing
Bashamega Apr 23, 2025
7f82e1f
regenerate
Bashamega Apr 23, 2025
9afe136
-
Bashamega Apr 23, 2025
a2b7a93
feat: comments for iterator
Bashamega Apr 24, 2025
d6d08f7
Merge branch 'microsoft:main' into descriptions
Bashamega Apr 24, 2025
d65d812
generate
Bashamega Apr 24, 2025
04ba40c
-
Bashamega Apr 24, 2025
7da9e85
-
Bashamega Apr 24, 2025
576b872
-
Bashamega Apr 24, 2025
16ef393
-
Bashamega Apr 24, 2025
5110391
-
Bashamega Apr 24, 2025
63c359d
generate
Bashamega Apr 24, 2025
7a40173
clean
Bashamega Apr 24, 2025
fdddfa6
remove await
Bashamega Apr 25, 2025
968a4e4
simplify
Bashamega Apr 25, 2025
0123276
refactor: extract title generation logic into a separate function
Bashamega Apr 25, 2025
e146dfe
refactor: remove descriptions parameter from emitFlavor and emitWebId…
Bashamega Apr 27, 2025
d97bcb7
-
Bashamega Apr 27, 2025
de83ebc
Merge branch 'microsoft:main' into descriptions
Bashamega Apr 27, 2025
7386df6
generate
Bashamega Apr 27, 2025
619d3c2
merge branches
Bashamega Apr 28, 2025
7d3c431
refactor: optimize file processing in generateDescriptions function u…
Bashamega Apr 28, 2025
3c7d15a
Merge branches
Bashamega Apr 29, 2025
ebfc8c4
Merge branch 'microsoft:main' into descriptions
Bashamega May 4, 2025
ff14106
Update
Bashamega May 4, 2025
88daf24
-
Bashamega May 4, 2025
09a8071
merge
Bashamega May 14, 2025
53d05d3
-
Bashamega May 14, 2025
155f013
-
Bashamega May 14, 2025
fae5ec1
-
Bashamega May 14, 2025
3130a7a
.
Bashamega May 15, 2025
79d9131
use leaf
Bashamega May 15, 2025
615bdb5
Merge branch 'microsoft:main' into descriptions
Bashamega May 17, 2025
ea052dc
-
Bashamega May 21, 2025
bff888b
Merge branch 'descriptions' of https://github.com/Bashamega/TypeScrip…
May 21, 2025
11d8d3e
Update mdn-comments.ts
Bashamega May 21, 2025
94d22b9
Refactor merge function to support optional parameter and update merg…
Bashamega May 28, 2025
d2ee6f5
Merge branch 'descriptions' of https://github.com/Bashamega/TypeScrip…
Bashamega May 28, 2025
241a83c
format
Bashamega May 28, 2025
9e7d2f9
-
Bashamega May 29, 2025
32fee24
Update emitNonCallbackInterfaces to include interfaces without names …
Bashamega May 29, 2025
12a3cb9
-
Bashamega May 29, 2025
262a699
-
Bashamega May 29, 2025
63c7cdb
-
Bashamega May 29, 2025
7e2b12e
-
Bashamega Jun 3, 2025
7ecc60d
-
Bashamega Jun 3, 2025
1848c57
remove try and catch
Bashamega Jun 3, 2025
734c5e0
Update src/build/mdn-comments.ts
Bashamega Jun 3, 2025
8673704
update logic
Bashamega Jun 3, 2025
c4062ba
Update src/build/mdn-comments.ts
Bashamega Jun 3, 2025
6f8d929
-
Bashamega Jun 3, 2025
43d9b43
Update src/build/mdn-comments.ts
Bashamega Jun 3, 2025
dc848db
Update src/build.ts
Bashamega Jun 3, 2025
6ddc417
lint
Bashamega Jun 3, 2025
8cc781b
-
Bashamega Jun 3, 2025
7d81067
Merge branch 'microsoft:main' into descriptions
Bashamega Jun 3, 2025
6a65a54
generate
Bashamega Jun 3, 2025
99cf7ec
-
Bashamega Jun 3, 2025
a931367
Update src/build.ts
Bashamega Jun 3, 2025
e529775
Update src/build/mdn-comments.ts
Bashamega Jun 3, 2025
4cc342b
Update src/build/mdn-comments.ts
Bashamega Jun 3, 2025
0ffb148
Update src/build/mdn-comments.ts
Bashamega Jun 3, 2025
3f65e0f
Update src/build/mdn-comments.ts
Bashamega Jun 3, 2025
20c60b9
fix
Bashamega Jun 3, 2025
3e8433e
-
Bashamega Jun 3, 2025
3877aad
rename
Bashamega Jun 3, 2025
2fc354e
-
Bashamega Jun 3, 2025
0f3a8df
Refactor generatePath function in mdn-comments.ts to simplify return …
Bashamega Jun 3, 2025
3a2afba
Update src/build/mdn-comments.ts
saschanaz Jun 3, 2025
f449210
Update src/build/mdn-comments.ts
saschanaz Jun 3, 2025
4120aa3
Update src/build/mdn-comments.ts
saschanaz Jun 3, 2025
01fca42
Update src/build/mdn-comments.ts
saschanaz Jun 3, 2025
99655cf
Update src/build/mdn-comments.ts
saschanaz Jun 3, 2025
a81c050
Update src/build/mdn-comments.ts
saschanaz Jun 3, 2025
fcdcab9
Update src/build/mdn-comments.ts
saschanaz Jun 3, 2025
d101d73
Apply suggestions from code review
saschanaz Jun 3, 2025
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions src/build/mdn-comments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,7 @@ const types: Record<string, string> = {
};

function generateTypes(content: string): string[] | undefined {
const pageType = content.match(/page-type:\s*["']?([^"'\n]+)["']?/);
if (!pageType) throw new Error("pageType not found");

const pageType = content.match(/page-type:\s*["']?([^"'\n]+)["']?/)!;
const type = pageType[1].split("-").pop()!;
const plural = types[type];
if (!plural) return;
Expand All @@ -84,9 +82,7 @@ function generateTypes(content: string): string[] | undefined {
}

function generateSlug(content: string): string[] {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(This is actually more like extractSlug)

const match = content.match(/slug:\s*["']?([^"'\n]+)["']?/);
if (!match) throw new Error("Slug not found");

const match = content.match(/slug:\s*["']?([^"'\n]+)["']?/)!;
const url = match[1].split(":").pop()!;
const parts = url.split("/").slice(2); // skip `/en-US/web/api/...`
return parts; // Keep only top-level and method
Expand Down
Loading