diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2020-06-04 08:36:25 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-04 08:36:25 -0400 |
commit | e3cc3db20fc86d9adb19bb472e8c96ae5f7c77c0 (patch) | |
tree | 78dcdb431dbc03e2561f8aa8c21bf3af7302885b | |
parent | 42a04ea08a09e29417518524cbe2245c165e6f55 (diff) |
Revert "feat: format deno bundle output (#5139)" (#6085)
This reverts commit 93cf3bd5341d5985201ea0905280082d5a3310f9.
-rw-r--r-- | cli/fmt.rs | 7 | ||||
-rw-r--r-- | cli/main.rs | 6 | ||||
-rw-r--r-- | cli/tests/bundle.test.out | 14 |
3 files changed, 7 insertions, 20 deletions
diff --git a/cli/fmt.rs b/cli/fmt.rs index c297f042c..d3f230ae2 100644 --- a/cli/fmt.rs +++ b/cli/fmt.rs @@ -179,13 +179,6 @@ fn format_stdin(check: bool) -> Result<(), ErrBox> { Ok(()) } -/// Formats the given source text -pub fn format_text(source: &str) -> Result<String, ErrBox> { - dprint::Formatter::new(get_config()) - .format_text(&PathBuf::from("_tmp.ts"), &source) - .map_err(|e| OpError::other(e).into()) -} - fn files_str(len: usize) -> &'static str { if len == 1 { "file" diff --git a/cli/main.rs b/cli/main.rs index 4ccadfa2a..6d9aacf37 100644 --- a/cli/main.rs +++ b/cli/main.rs @@ -403,16 +403,14 @@ async fn bundle_command( debug!(">>>>> bundle END"); - let output_string = fmt::format_text(&output)?; - if let Some(out_file_) = out_file.as_ref() { info!("Emitting bundle to {:?}", out_file_); - let output_bytes = output_string.as_bytes(); + let output_bytes = output.as_bytes(); let output_len = output_bytes.len(); deno_fs::write_file(out_file_, output_bytes, 0o666)?; info!("{} emitted.", human_size(output_len as f64)); } else { - println!("{}", output_string); + println!("{}", output); } Ok(()) } diff --git a/cli/tests/bundle.test.out b/cli/tests/bundle.test.out index c3e12e8a9..b286dad48 100644 --- a/cli/tests/bundle.test.out +++ b/cli/tests/bundle.test.out @@ -6,17 +6,13 @@ let System, __instantiateAsync, __instantiate; })(); System.register("print_hello", [], function (exports_1, context_1) { - [WILDCARD] +[WILDCARD] +}); +System.register("subdir2/mod2", ["print_hello"], function (exports_2, context_2) { +[WILDCARD] }); -System.register( - "subdir2/mod2", - ["print_hello"], - function (exports_2, context_2) { - [WILDCARD] - }, -); System.register("mod1", ["subdir2/mod2"], function (exports_3, context_3) { - [WILDCARD] +[WILDCARD] }); const __exp = __instantiate("mod1"); |