2023-01-02 16:00:42 -05:00
|
|
|
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
2019-08-14 11:03:02 -04:00
|
|
|
|
2021-12-29 08:30:08 -05:00
|
|
|
use deno_core::Extension;
|
|
|
|
|
2022-03-11 17:07:02 -05:00
|
|
|
pub mod bench;
|
2023-09-26 20:21:06 -04:00
|
|
|
pub mod jupyter;
|
2021-04-28 14:17:04 -04:00
|
|
|
pub mod testing;
|
2020-09-10 09:57:45 -04:00
|
|
|
|
2023-11-11 12:01:48 -05:00
|
|
|
pub fn cli_exts() -> Vec<Extension> {
|
2023-08-05 19:47:15 -04:00
|
|
|
vec![
|
|
|
|
#[cfg(not(feature = "__runtime_js_sources"))]
|
2023-11-11 12:01:48 -05:00
|
|
|
cli::init_ops(),
|
2023-08-05 19:47:15 -04:00
|
|
|
#[cfg(feature = "__runtime_js_sources")]
|
2023-11-11 12:01:48 -05:00
|
|
|
cli::init_ops_and_esm(),
|
2023-08-05 19:47:15 -04:00
|
|
|
]
|
2021-12-29 08:30:08 -05:00
|
|
|
}
|
|
|
|
|
2023-08-05 19:47:15 -04:00
|
|
|
// ESM parts duplicated in `../build.rs`. Keep in sync!
|
|
|
|
deno_core::extension!(cli,
|
|
|
|
deps = [runtime],
|
|
|
|
esm_entry_point = "ext:cli/99_main.js",
|
|
|
|
esm = [
|
|
|
|
dir "js",
|
|
|
|
"40_testing.js",
|
|
|
|
"99_main.js"
|
|
|
|
],
|
|
|
|
customizer = |ext: &mut deno_core::Extension| {
|
|
|
|
ext.esm_files.to_mut().push(deno_core::ExtensionFileSource {
|
|
|
|
specifier: "ext:cli/runtime/js/99_main.js",
|
|
|
|
code: deno_core::ExtensionFileSourceCode::LoadedFromFsDuringSnapshot(
|
|
|
|
deno_runtime::js::PATH_FOR_99_MAIN_JS,
|
|
|
|
),
|
|
|
|
});
|
|
|
|
},
|
2023-03-17 14:22:15 -04:00
|
|
|
);
|