summaryrefslogtreecommitdiff
path: root/cli/main.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2024-02-29 19:12:04 +0000
committerGitHub <noreply@github.com>2024-02-29 19:12:04 +0000
commitfb31ae73e40896c1d1dfdb26c265222f49907d32 (patch)
treef113a07ecf0dd54f7df38b5b3c1f7f481b581498 /cli/main.rs
parenta9aef0d017bd053d7f4014c363dbc5898ced1a2e (diff)
feat(unstable): `deno add` subcommand (#22520)
This commit adds "deno add" subcommand that has a basic support for adding "jsr:" packages to "deno.json" file. This currently doesn't support "npm:" specifiers and specifying version constraints.
Diffstat (limited to 'cli/main.rs')
-rw-r--r--cli/main.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/cli/main.rs b/cli/main.rs
index 5e446efb8..60d10badc 100644
--- a/cli/main.rs
+++ b/cli/main.rs
@@ -88,6 +88,9 @@ fn spawn_subcommand<F: Future<Output = T> + 'static, T: SubcommandOutput>(
async fn run_subcommand(flags: Flags) -> Result<i32, AnyError> {
let handle = match flags.subcommand.clone() {
+ DenoSubcommand::Add(add_flags) => spawn_subcommand(async {
+ tools::registry::add(flags, add_flags).await
+ }),
DenoSubcommand::Bench(bench_flags) => spawn_subcommand(async {
if bench_flags.watch.is_some() {
tools::bench::run_benchmarks_with_watch(flags, bench_flags).await