Skip to content

Commit

Permalink
Update default create-react-router template (#12342)
Browse files Browse the repository at this point in the history
  • Loading branch information
markdalgleish authored Nov 22, 2024
1 parent b98209d commit f763fd2
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
Binary file not shown.
Binary file not shown.
8 changes: 2 additions & 6 deletions packages/create-react-router/__tests__/github-mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,8 @@ let sendTarball: ResponseResolver = async (req, res, ctx) => {
invariant(typeof repo === "string", "repo must be a string");

let pathToTarball: string;
if (owner === "remix-run" && repo === "react-router") {
pathToTarball = path.join(
__dirname,
"fixtures",
"react-router-repo.tar.gz"
);
if (owner === "remix-run" && repo === "react-router-templates") {
pathToTarball = path.join(__dirname, "fixtures", "templates-repo.tar.gz");
} else if (owner === "fake-react-router-tester" && repo === "nested-dir") {
pathToTarball = path.join(__dirname, "fixtures", "nested-dir-repo.tar.gz");
} else {
Expand Down
7 changes: 4 additions & 3 deletions packages/create-react-router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,13 +251,14 @@ async function copyTemplateToTempDirStep(ctx: Context) {
info("Template:", ["Using ", color.reset(ctx.template), "..."]);
} else {
log("");
info("Using basic template"); // TODO: (v7) Add link to templates
info("Using default template", [
"See https://github.com/remix-run/react-router-templates for more",
]);
}

let template =
ctx.template ??
// TODO: (v7) Update to main branch
"https://github.com/remix-run/react-router/tree/dev/templates/basic";
"https://github.com/remix-run/react-router-templates/tree/main/default";

await loadingIndicator({
start: "Template copying...",
Expand Down

0 comments on commit f763fd2

Please sign in to comment.