Skip to content
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

feat: deno doc --html #21015

Merged
merged 21 commits into from
Nov 1, 2023
Merged

feat: deno doc --html #21015

merged 21 commits into from
Nov 1, 2023

Conversation

bartlomieju
Copy link
Member

@bartlomieju bartlomieju commented Oct 30, 2023

This commit adds static documentation site generate to "deno doc"
subcommand.

Example:

$ deno doc --html --name="My library" ./mod.ts
# outputs to ./docs/

$ deno doc --html --name="My library" --output=./documentation/ ./mod.ts ./file2.js
# outputs to ./documentation/

$ deno doc --html --name="My library" ./**/mod.ts
# generate docs for all files with "mod.ts" name

Closes #8233

cli/args/flags.rs Outdated Show resolved Hide resolved
@bartlomieju
Copy link
Member Author

bartlomieju commented Oct 30, 2023

Blocked by #21018

@bartlomieju bartlomieju requested a review from dsherret October 31, 2023 23:23
cli/args/flags.rs Outdated Show resolved Hide resolved
cli/tests/testdata/doc/use_import_map.out Outdated Show resolved Hide resolved
Comment on lines +198 to +203
"{}",
colors::green(format!(
"Written {} files to {:?}",
no_of_files, html_options.output
))
);
Copy link
Member Author

Choose a reason for hiding this comment

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

Suggestions welcome for other prompts

Copy link
Member

@dsherret dsherret left a comment

Choose a reason for hiding this comment

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

LGTM

cli/tools/doc.rs Outdated
}

println!(
Copy link
Member

Choose a reason for hiding this comment

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

Should this be log::info!?

Copy link
Member Author

@bartlomieju bartlomieju Nov 1, 2023

Choose a reason for hiding this comment

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

Using log::info! seems to not print this info by default. I'm gonna revert it meh, it was print to stderr

cli/tools/doc.rs Show resolved Hide resolved
@bartlomieju bartlomieju enabled auto-merge (squash) November 1, 2023 14:05
@bartlomieju bartlomieju merged commit 8ea2d92 into denoland:main Nov 1, 2023
12 checks passed
@bartlomieju bartlomieju deleted the deno_doc_html branch November 1, 2023 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

$ deno docs --local to render the website locally for a local folder/modules
3 participants