2023-01-02 16:00:42 -05:00
|
|
|
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
2019-08-14 17:03:02 +02:00
|
|
|
|
2021-12-29 14:30:08 +01:00
|
|
|
use deno_core::Extension;
|
|
|
|
|
2022-03-11 23:07:02 +01:00
|
|
|
pub mod bench;
|
2023-09-27 02:21:06 +02:00
|
|
|
pub mod jupyter;
|
2021-04-29 02:17:04 +08:00
|
|
|
pub mod testing;
|
2020-09-10 09:57:45 -04:00
|
|
|
|
2023-11-11 09:01:48 -08:00
|
|
|
pub fn cli_exts() -> Vec<Extension> {
|
2023-08-06 00:47:15 +01:00
|
|
|
vec![
|
|
|
|
#[cfg(not(feature = "__runtime_js_sources"))]
|
2023-11-11 09:01:48 -08:00
|
|
|
cli::init_ops(),
|
2023-08-06 00:47:15 +01:00
|
|
|
#[cfg(feature = "__runtime_js_sources")]
|
2023-11-11 09:01:48 -08:00
|
|
|
cli::init_ops_and_esm(),
|
2023-08-06 00:47:15 +01:00
|
|
|
]
|
2021-12-29 14:30:08 +01:00
|
|
|
}
|
|
|
|
|
2023-08-06 00:47:15 +01: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 12:22:15 -06:00
|
|
|
);
|