summaryrefslogtreecommitdiff
path: root/cli/module_loader.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2023-04-13 14:03:07 -0400
committerGitHub <noreply@github.com>2023-04-13 18:03:07 +0000
commitd192d84a0e0b9954882211b827f17512ad37be7d (patch)
tree2aa50a9a3785a34097fab0acd1ab245313994ff7 /cli/module_loader.rs
parent6e8618ae0f55bcaa4cfaaa579b4e21f9f74b117d (diff)
refactor(cli): add `Emitter` struct (#18690)
Removes the functions in the `emit` module and replaces them with an `Emitter` struct that can have "ctor dependencies" injected rather than using functions to pass along the dependencies. This is part of a long term refactor to move more functionality out of proc state.
Diffstat (limited to 'cli/module_loader.rs')
-rw-r--r--cli/module_loader.rs7
1 files changed, 1 insertions, 6 deletions
diff --git a/cli/module_loader.rs b/cli/module_loader.rs
index b7df15e31..746743525 100644
--- a/cli/module_loader.rs
+++ b/cli/module_loader.rs
@@ -1,7 +1,6 @@
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
use crate::args::TsTypeLib;
-use crate::emit::emit_parsed_source;
use crate::node;
use crate::proc_state::ProcState;
use crate::util::text_encoding::code_without_source_map;
@@ -117,14 +116,10 @@ impl CliModuleLoader {
| MediaType::Jsx
| MediaType::Tsx => {
// get emit text
- emit_parsed_source(
- &self.ps.emit_cache,
- &self.ps.parsed_source_cache,
+ self.ps.emitter.emit_parsed_source(
specifier,
*media_type,
source,
- &self.ps.emit_options,
- self.ps.emit_options_hash,
)?
}
MediaType::TsBuildInfo | MediaType::Wasm | MediaType::SourceMap => {