Skip to content

Commit

Permalink
Keep all deno_std URLs in sync (#2930)
Browse files Browse the repository at this point in the history
  • Loading branch information
ry committed Sep 12, 2019
1 parent c7db26c commit 93d6faa
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions cli/flags.rs
Expand Up @@ -12,6 +12,19 @@ use std;
use std::str;
use std::str::FromStr;

macro_rules! std_url {
($x:expr) => {
concat!("https://deno.land/std@06958a4/", $x)
};
}

/// Used for `deno fmt <files>...` subcommand
const PRETTIER_URL: &str = std_url!("prettier/main.ts");
/// Used for `deno install...` subcommand
const INSTALLER_URL: &str = std_url!("installer/mod.ts");
/// Used for `deno test...` subcommand
const TEST_RUNNER_URL: &str = std_url!("testing/runner.ts");

// Creates vector of strings, Vec<String>
macro_rules! svec {
($($x:expr),*) => (vec![$($x.to_string()),*]);
Expand Down Expand Up @@ -677,13 +690,6 @@ fn parse_script_args(
(argv, flags)
}

/// Used for `deno fmt <files>...` subcommand
const PRETTIER_URL: &str = "https://deno.land/std@06958a4/prettier/main.ts";
/// Used for `deno install...` subcommand
const INSTALLER_URL: &str = "https://deno.land/std@v0.11/installer/mod.ts";
/// Used for `deno test...` subcommand
const TEST_RUNNER_URL: &str = "https://deno.land/std@4531fa8/testing/runner.ts";

/// These are currently handled subcommands.
/// There is no "Help" subcommand because it's handled by `clap::App` itself.
#[derive(Debug, PartialEq)]
Expand Down

0 comments on commit 93d6faa

Please sign in to comment.