mirror of
https://github.com/denoland/deno.git
synced 2025-01-21 21:50:00 -05:00
This reverts commit 93cf3bd534
.
This commit is contained in:
parent
42a04ea08a
commit
e3cc3db20f
3 changed files with 7 additions and 20 deletions
|
@ -179,13 +179,6 @@ fn format_stdin(check: bool) -> Result<(), ErrBox> {
|
||||||
Ok(())
|
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 {
|
fn files_str(len: usize) -> &'static str {
|
||||||
if len == 1 {
|
if len == 1 {
|
||||||
"file"
|
"file"
|
||||||
|
|
|
@ -403,16 +403,14 @@ async fn bundle_command(
|
||||||
|
|
||||||
debug!(">>>>> bundle END");
|
debug!(">>>>> bundle END");
|
||||||
|
|
||||||
let output_string = fmt::format_text(&output)?;
|
|
||||||
|
|
||||||
if let Some(out_file_) = out_file.as_ref() {
|
if let Some(out_file_) = out_file.as_ref() {
|
||||||
info!("Emitting bundle to {:?}", out_file_);
|
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();
|
let output_len = output_bytes.len();
|
||||||
deno_fs::write_file(out_file_, output_bytes, 0o666)?;
|
deno_fs::write_file(out_file_, output_bytes, 0o666)?;
|
||||||
info!("{} emitted.", human_size(output_len as f64));
|
info!("{} emitted.", human_size(output_len as f64));
|
||||||
} else {
|
} else {
|
||||||
println!("{}", output_string);
|
println!("{}", output);
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,13 +8,9 @@ let System, __instantiateAsync, __instantiate;
|
||||||
System.register("print_hello", [], function (exports_1, context_1) {
|
System.register("print_hello", [], function (exports_1, context_1) {
|
||||||
[WILDCARD]
|
[WILDCARD]
|
||||||
});
|
});
|
||||||
System.register(
|
System.register("subdir2/mod2", ["print_hello"], function (exports_2, context_2) {
|
||||||
"subdir2/mod2",
|
|
||||||
["print_hello"],
|
|
||||||
function (exports_2, context_2) {
|
|
||||||
[WILDCARD]
|
[WILDCARD]
|
||||||
},
|
});
|
||||||
);
|
|
||||||
System.register("mod1", ["subdir2/mod2"], function (exports_3, context_3) {
|
System.register("mod1", ["subdir2/mod2"], function (exports_3, context_3) {
|
||||||
[WILDCARD]
|
[WILDCARD]
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue