1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 23:34:47 -05:00

Rename deno prefetch to deno fetch (#2210)

This commit is contained in:
Bartek Iwańczuk 2019-04-25 19:47:33 +02:00 committed by Ryan Dahl
parent 098d6fffab
commit b7d8a0c6f6
5 changed files with 14 additions and 14 deletions

View file

@ -96,9 +96,9 @@ pub fn create_cli_app<'a, 'b>() -> App<'a, 'b> {
.require_equals(true)
.help("Set V8 command line options"),
).subcommand(
SubCommand::with_name("prefetch")
SubCommand::with_name("fetch")
.setting(AppSettings::DisableVersion)
.about("Prefetch the dependencies")
.about("Fetch the dependencies")
.arg(Arg::with_name("file").takes_value(true).required(true)),
).subcommand(
SubCommand::with_name("types")

View file

@ -153,7 +153,7 @@ fn types_command() {
println!("{}", content);
}
fn prefetch_or_info_command(
fn fetch_or_info_command(
flags: DenoFlags,
argv: Vec<String>,
print_info: bool,
@ -299,12 +299,12 @@ fn main() {
("info", Some(info_match)) => {
let file: &str = info_match.value_of("file").unwrap();
argv.extend(vec![file.to_string()]);
prefetch_or_info_command(flags, argv, true);
fetch_or_info_command(flags, argv, true);
}
("prefetch", Some(prefetch_match)) => {
let file: &str = prefetch_match.value_of("file").unwrap();
("fetch", Some(fetch_match)) => {
let file: &str = fetch_match.value_of("file").unwrap();
argv.extend(vec![file.to_string()]);
prefetch_or_info_command(flags, argv, false);
fetch_or_info_command(flags, argv, false);
}
("fmt", Some(fmt_match)) => {
let files: Vec<String> = fmt_match

View file

@ -6,14 +6,14 @@ from util import mkdtemp, tests_path, run_output, green_ok
import shutil
def prefetch_test(deno_exe):
sys.stdout.write("prefetch_test...")
def fetch_test(deno_exe):
sys.stdout.write("fetch_test...")
sys.stdout.flush()
deno_dir = mkdtemp()
try:
t = os.path.join(tests_path, "006_url_imports.ts")
output = run_output([deno_exe, "prefetch", t],
output = run_output([deno_exe, "fetch", t],
merge_env={"DENO_DIR": deno_dir})
assert output == ""
# Check that we actually did the prefetch.
@ -27,4 +27,4 @@ def prefetch_test(deno_exe):
if __name__ == "__main__":
prefetch_test(sys.argv[1])
fetch_test(sys.argv[1])

View file

@ -13,7 +13,7 @@ from unit_tests import unit_tests
from util_test import util_test
from benchmark_test import benchmark_test
from repl_test import repl_tests
from prefetch_test import prefetch_test
from fetch_test import fetch_test
from fmt_test import fmt_test
import subprocess
import http_server
@ -94,7 +94,7 @@ def main(argv):
unit_tests(deno_exe)
prefetch_test(deno_exe)
fetch_test(deno_exe)
fmt_test(deno_exe)
integration_tests(deno_exe)

View file

@ -561,9 +561,9 @@ OPTIONS:
SUBCOMMANDS:
<script> Script to run
eval Eval script
fetch Fetch the dependencies
fmt Format files
info Show source file related info
prefetch Prefetch the dependencies
types Print runtime TypeScript declarations
ENVIRONMENT VARIABLES: