mirror of
https://github.com/denoland/deno.git
synced 2025-08-03 02:22:40 +00:00
perf(cli): conditionally load typescript declaration files (#19392)
Closes #18583
This commit is contained in:
parent
455b0eb8bb
commit
2aba4365ae
16 changed files with 156 additions and 67 deletions
|
@ -16,6 +16,7 @@ use deno_core::error::AnyError;
|
|||
use deno_core::resolve_path;
|
||||
use deno_core::resolve_url_or_path;
|
||||
use deno_doc as doc;
|
||||
use deno_graph::GraphKind;
|
||||
use deno_graph::ModuleSpecifier;
|
||||
use std::path::PathBuf;
|
||||
|
||||
|
@ -43,7 +44,7 @@ pub async fn print_docs(
|
|||
Vec::new(),
|
||||
);
|
||||
let analyzer = deno_graph::CapturingModuleAnalyzer::default();
|
||||
let mut graph = deno_graph::ModuleGraph::default();
|
||||
let mut graph = deno_graph::ModuleGraph::new(GraphKind::TypesOnly);
|
||||
graph
|
||||
.build(
|
||||
vec![source_file_specifier.clone()],
|
||||
|
@ -87,7 +88,7 @@ pub async fn print_docs(
|
|||
file_fetcher.insert_cached(root);
|
||||
|
||||
let graph = module_graph_builder
|
||||
.create_graph(vec![root_specifier.clone()])
|
||||
.create_graph(GraphKind::TypesOnly, vec![root_specifier.clone()])
|
||||
.await?;
|
||||
|
||||
if let Some(lockfile) = maybe_lockfile {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue