summaryrefslogtreecommitdiff
path: root/cli/main.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2020-08-10 17:41:19 +0200
committerGitHub <noreply@github.com>2020-08-10 17:41:19 +0200
commit6fcf06306ed2ea52031a97b918f1e929d7209250 (patch)
tree01eaea1836d5ee864aafb57677c9fb4d76e33eba /cli/main.rs
parentfdb2dab7cd59a70b79704e0a0efca44be2bfc186 (diff)
feat(doc): handle imports (#6987)
This commit adds additional objects to JSON output of "deno doc" command to facilitate linking between types in different modules.
Diffstat (limited to 'cli/main.rs')
-rw-r--r--cli/main.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/cli/main.rs b/cli/main.rs
index 0c84e7b3e..799d47e32 100644
--- a/cli/main.rs
+++ b/cli/main.rs
@@ -532,7 +532,7 @@ async fn doc_command(
.await
};
- let doc_nodes = match parse_result {
+ let mut doc_nodes = match parse_result {
Ok(nodes) => nodes,
Err(e) => {
eprintln!("{}", e);
@@ -543,6 +543,7 @@ async fn doc_command(
if json {
write_json_to_stdout(&doc_nodes)
} else {
+ doc_nodes.retain(|doc_node| doc_node.kind != doc::DocNodeKind::Import);
let details = if let Some(filter) = maybe_filter {
let nodes =
doc::find_nodes_by_name_recursively(doc_nodes, filter.clone());