-
Notifications
You must be signed in to change notification settings - Fork 5
BrowseDoc: Support .browse files #92
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
base: pre
Are you sure you want to change the base?
Changes from all commits
d5ecc44
d0adbbb
236dd12
09144f0
19cded3
24bf1a7
334832b
0329a01
bb6ccfe
9c25ab3
8bba7af
9a26f33
71289d4
ab0746b
4130efb
d655cd8
c229746
77e1584
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -44,6 +44,7 @@ const main = async () => { | |
| ), | ||
| ]; | ||
| } else if (ext === ".browse") { | ||
| console.log(`Parsing ${directory}/${file}`); | ||
| const stem = path.basename(file, ".browse"); | ||
| return [ | ||
| stem, | ||
|
|
@@ -65,7 +66,9 @@ const main = async () => { | |
|
|
||
| const outputs = await Promise.all( | ||
| pages.map(([stem, doc]) => | ||
| markdownPlugin(doc, path.join(outPath, stem + ".md")) | ||
| Object.keys(doc).map((scope) => | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I did this earlier so the output can include docs for multiple scopes into a single file. This is important sometimes. For example:
I think what I did was "better" - it's still opinionated since we assume files are the final output, but really we're copy-pasting things to github wiki, and ideally we can abstract this out like JSDoc/JavaDocs etc. does so it simply spits out an IR, and then there's a different plugin that produces HTML/Markdown/.txt files etc. I think you're going a step back from that by limiting things to one scope per file
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IIRC I did this because I wanted the default behavior to be that the filename was the scope name in the case that the user doesn't provide an @name argument. Using this method the default name for Math was 'main' because it's in the main file. I'll fix it so that both functionalities stay intact.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Makes sense |
||
| markdownPlugin(doc, path.join(outPath, scope + ".md")) | ||
| ) | ||
| ) | ||
| ); | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.