feat(cli): --ext parameter for run, compile, and bundle (#17172)

Adds `--ext` to `deno run`, closes #5088

Additionally

- Adds `--ext` to `deno compile` and `deno bundle`
This commit is contained in:
Cre3per 2023-03-22 15:15:53 +01:00 committed by GitHub
parent 50b793c9ed
commit fd0658fb42
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
27 changed files with 390 additions and 128 deletions

View file

@ -3823,6 +3823,30 @@ itest!(error_cause_recursive {
exit_code: 1,
});
itest!(default_file_extension_is_js {
args: "run --check file_extensions/js_without_extension",
output: "file_extensions/js_without_extension.out",
exit_code: 0,
});
itest!(js_without_extension {
args: "run --ext js --check file_extensions/js_without_extension",
output: "file_extensions/js_without_extension.out",
exit_code: 0,
});
itest!(ts_without_extension {
args: "run --ext ts file_extensions/ts_without_extension",
output: "file_extensions/ts_without_extension.out",
exit_code: 0,
});
itest!(ext_flag_takes_precedence_over_extension {
args: "run --ext ts file_extensions/ts_with_js_extension.js",
output: "file_extensions/ts_with_extension.out",
exit_code: 0,
});
#[test]
fn websocket() {
let _g = util::http_server();