(ctx: Context)
| 708 | } |
| 709 | |
| 710 | function printHelp(ctx: Context) { |
| 711 | // prettier-ignore |
| 712 | let output = ` |
| 713 | ${title("create-react-router")} |
| 714 | |
| 715 | ${color.heading("Usage")}: |
| 716 | |
| 717 | ${color.dim("$")} ${color.greenBright("create-react-router")} ${color.arg("<projectDir>")} ${color.arg("<...options>")} |
| 718 | |
| 719 | ${color.heading("Values")}: |
| 720 | |
| 721 | ${color.arg("projectDir")} ${color.dim(`The React Router project directory`)} |
| 722 | |
| 723 | ${color.heading("Options")}: |
| 724 | |
| 725 | ${color.arg("--help, -h")} ${color.dim(`Print this help message and exit`)} |
| 726 | ${color.arg("--version, -V")} ${color.dim(`Print the CLI version and exit`)} |
| 727 | ${color.arg("--no-color")} ${color.dim(`Disable ANSI colors in console output`)} |
| 728 | ${color.arg("--no-motion")} ${color.dim(`Disable animations in console output`)} |
| 729 | |
| 730 | ${color.arg("--template <name>")} ${color.dim(`The project template to use`)} |
| 731 | ${color.arg("--[no-]install")} ${color.dim(`Whether or not to install dependencies after creation`)} |
| 732 | ${color.arg("--package-manager")} ${color.dim(`The package manager to use`)} |
| 733 | ${color.arg("--show-install-output")} ${color.dim(`Whether to show the output of the install process`)} |
| 734 | ${color.arg("--[no-]agent-skills")} ${color.dim(`Whether or not to include the React Router agent skill`)} |
| 735 | ${color.arg("--[no-]git-init")} ${color.dim(`Whether or not to initialize a Git repository`)} |
| 736 | ${color.arg("--yes, -y")} ${color.dim(`Skip all option prompts and run setup`)} |
| 737 | ${color.arg("--react-router-version, -v")} ${color.dim(`The version of React Router to use`)} |
| 738 | |
| 739 | ${color.heading("Creating a new project")}: |
| 740 | |
| 741 | React Router projects are created from templates. A template can be: |
| 742 | |
| 743 | - a GitHub repo shorthand, :username/:repo or :username/:repo/:directory |
| 744 | - the URL of a GitHub repo (or directory within it) |
| 745 | - the URL of a tarball |
| 746 | - a file path to a directory of files |
| 747 | - a file path to a tarball |
| 748 | ${[ |
| 749 | "remix-run/react-router/templates/basic", |
| 750 | "remix-run/react-router/examples/basic", |
| 751 | ":username/:repo", |
| 752 | ":username/:repo/:directory", |
| 753 | "https://github.com/:username/:repo", |
| 754 | "https://github.com/:username/:repo/tree/:branch", |
| 755 | "https://github.com/:username/:repo/tree/:branch/:directory", |
| 756 | "https://github.com/:username/:repo/archive/refs/tags/:tag.tar.gz", |
| 757 | "https://example.com/template.tar.gz", |
| 758 | "./path/to/template", |
| 759 | "./path/to/template.tar.gz", |
| 760 | ].reduce((str, example) => { |
| 761 | return `${str}\n${color.dim("$")} ${color.greenBright("create-react-router")} my-app ${color.arg(`--template ${example}`)}`; |
| 762 | }, "")} |
| 763 | |
| 764 | To create a new project from a template in a private GitHub repo, |
| 765 | pass the \`token\` flag with a personal access token with access |
| 766 | to that repo. |
| 767 | `; |
no test coverage detected
searching dependent graphs…