From d93f50372dc7897bc65adc2090eac199b3567c5f Mon Sep 17 00:00:00 2001 From: Jo Franchetti Date: Wed, 18 Sep 2024 10:47:17 +0100 Subject: [PATCH] fixing some broken links, renaming some files, adding a cli TOC (#862) --- oldurls.json | 2 +- runtime/_data.ts | 17 ++++++-- .../getting_started/command_line_interface.md | 8 ++-- runtime/reference/cli/all_commands.md | 42 +++++++++++++++++++ runtime/tutorials/how_to_with_npm/react.md | 2 +- 5 files changed, 61 insertions(+), 10 deletions(-) create mode 100644 runtime/reference/cli/all_commands.md diff --git a/oldurls.json b/oldurls.json index 448e367e4..d442277ae 100644 --- a/oldurls.json +++ b/oldurls.json @@ -1,5 +1,5 @@ { - "/runtime/manual/examples/read_write_files/": "/examples/", + "/runtime/tutorials/read_write_files/": "/examples/", "/runtime/tutorials/unix_cat/": "/examples/unix-cat/", "/examples/dependency-management/": "/runtime/fundamentals/configuration/#dependencies" } diff --git a/runtime/_data.ts b/runtime/_data.ts index 978c043bb..310a22288 100644 --- a/runtime/_data.ts +++ b/runtime/_data.ts @@ -212,15 +212,25 @@ export const sidebar = [ "/runtime/tutorials/init_project/", "/runtime/tutorials/fetch_data/", "/runtime/tutorials/http_server/", - "/examples/reading-files/", - "/examples/writing-files/", + { + label: "Reading files", + id: "/examples/reading-files/", + }, + { + label: "Writing files", + id: "/examples/writing-files/", + }, "/runtime/tutorials/hashbang/", "/runtime/tutorials/cjs_to_esm/", + "/runtime/tutorials/how_to_with_npm/react/", "/runtime/tutorials/connecting_to_databases/", { label: "Advanced Examples", items: [ - "/examples/unix-cat/", + { + label: "Unix cat", + id: "/examples/unix-cat/", + }, "/runtime/tutorials/file_server/", "/runtime/tutorials/tcp_echo/", "/runtime/tutorials/subprocess/", @@ -244,7 +254,6 @@ export const sidebar = [ "/runtime/tutorials/how_to_with_npm/mysql2/", "/runtime/tutorials/how_to_with_npm/planetscale/", "/runtime/tutorials/how_to_with_npm/prisma/", - "/runtime/tutorials/how_to_with_npm/react/", "/runtime/tutorials/how_to_with_npm/redis/", "/runtime/tutorials/how_to_with_npm/vue/", ], diff --git a/runtime/getting_started/command_line_interface.md b/runtime/getting_started/command_line_interface.md index b8aa5bc02..9ae4d530b 100644 --- a/runtime/getting_started/command_line_interface.md +++ b/runtime/getting_started/command_line_interface.md @@ -21,10 +21,10 @@ used to customize its behavior. You can view all of the available commands and flags by running the `deno help` subcommand in your terminal, or using the `-h` or `--help` flags. -Check out the [CLI reference guide](/runtime/reference/cli/) for a further -documentation on all the subcommands and flags available. We'll take a look at a -few commands in a bit more detail below to see how they can be used and -configured. +Check out the [CLI reference guide](/runtime/reference/cli/all_commands/) for a +further documentation on all the subcommands and flags available. We'll take a +look at a few commands in a bit more detail below to see how they can be used +and configured. ## An example subcommand - `deno run` diff --git a/runtime/reference/cli/all_commands.md b/runtime/reference/cli/all_commands.md new file mode 100644 index 000000000..c8a0c6026 --- /dev/null +++ b/runtime/reference/cli/all_commands.md @@ -0,0 +1,42 @@ +--- +title: "Deno CLI Subcommands" +--- + +The Deno CLI (Command Line Interface) allows you to interact with the Deno +runtime environment from your terminal or command prompt. The CLI has a number +of subcommands that can be used to perform different tasks, check the links +below for more information on each subcommand. + +- [deno bench](/runtime/reference/cli/benchmarker/) - benchmarking tool +- [deno cache](/runtime/reference/cli/cache/) - cache and compile dependencies +- [deno check](/runtime/reference/cli/check/) - type check your program without + running it +- [deno compile](/runtime/reference/cli/compiler/) - compile a program into a + standalone executable +- [deno completions](/runtime/reference/cli/completions/) - generate shell + completions +- [deno coverage](/runtime/reference/cli/coverage/) - generate test coverage + reports +- [deno doc](/runtime/reference/cli/documentation_generator/) - generate + documentation for a module +- [deno eval](/runtime/reference/cli/eval/) - evaluate provided script +- [deno fmt](/runtime/reference/cli/formatter/) - format your code +- [deno info](/runtime/reference/cli/dependency_inspector/) - inspect an ES + module and all of its dependencies +- [deno init](/runtime/reference/cli/init/) - create a new project +- [deno install](/runtime/reference/cli/script_installer/) +- [deno jupyter](/runtime/reference/cli/jupyter/) - run a Jupyter notebook +- [deno lint](/runtime/reference/cli/linter/) - lint your code +- [deno lsp](/runtime/reference/cli/lsp/) - language server protocol integration +- [deno publish](/runtime/reference/cli/publish/) - publish a module +- [deno repl](/runtime/reference/cli/repl/) - starts a read-eval-print-loop +- [deno run](/runtime/reference/cli/run/) - run a script +- [deno serve](/runtime/reference/cli/serve/) - run a web server +- [deno task](/runtime/reference/cli/task_runner/) - run a task +- [deno test](/runtime/reference/cli/test/) - run your tests +- [deno types](/runtime/reference/cli/types/) - print runtime types +- [deno uninstall](/runtime/reference/cli/uninstall/) - uninstall a script +- [deno upgrade](/runtime/reference/cli/upgrade/) - upgrade Deno to the latest + version +- [environment variables](/runtime/reference/cli/env_variables/) +- [unstable feature flags](/runtime/reference/cli/unstable_flags/) diff --git a/runtime/tutorials/how_to_with_npm/react.md b/runtime/tutorials/how_to_with_npm/react.md index 16c33c645..bae5e3445 100644 --- a/runtime/tutorials/how_to_with_npm/react.md +++ b/runtime/tutorials/how_to_with_npm/react.md @@ -1,5 +1,5 @@ --- -title: "How to use React with Deno" +title: "Build a React App" oldUrl: - /runtime/manual/examples/how_to_with_npm/react/ - /runtime/manual/basics/react/