diff --git a/README.md b/README.md index 6225368..296a596 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ vr scripts +

@@ -112,7 +113,7 @@ In its simplest form, the `scripts` property behaves like in package.json: the k ### Compact deno run -When a command starts with a `.ts` file, `deno run` is automatically prepended: +When a command starts with a `.ts` or `.js` file, `deno run` is automatically prepended: ```yaml scripts: diff --git a/src/build_command_string.ts b/src/build_command_string.ts index 49b5a88..ec2dc96 100644 --- a/src/build_command_string.ts +++ b/src/build_command_string.ts @@ -109,6 +109,6 @@ function matchDenoCommand(command: string) { function matchCompactRun(command: string) { return command.match( - /^'(?:\\'|.)*?\.ts'|^"(?:\\"|.)*?\.ts"|^(?:\\\ |\S)+\.ts/, + /^'(?:\\'|.)*?\.[tj]s'|^"(?:\\"|.)*?\.[tj]s"|^(?:\\\ |\S)+\.[tj]s/, ); }