From bb1359e37f3c139225e79da55f132fcdca073de1 Mon Sep 17 00:00:00 2001 From: Jake Runzer Date: Thu, 5 May 2022 23:49:02 -0400 Subject: [PATCH] match deno if deno.json file is found --- src/providers/deno.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/providers/deno.rs b/src/providers/deno.rs index dca81979a..259fba8d8 100644 --- a/src/providers/deno.rs +++ b/src/providers/deno.rs @@ -17,7 +17,9 @@ impl Provider for DenoProvider { fn detect(&self, app: &App, _env: &Environment) -> Result { let re = Regex::new(r##"(?m)^import .+ from "https://deno.land/[^"]+\.ts";?$"##).unwrap(); - app.find_match(&re, "**/*.ts") + Ok(app.includes_file("deno.json") + || app.includes_file("deno.jsonc") + || app.find_match(&re, "**/*.ts")?) } fn setup(&self, _app: &App, _env: &Environment) -> Result> {