Skip to content

Commit 59cda72

Browse files
committed
Always use main branch for examples
1 parent 4abe9fc commit 59cda72

File tree

11 files changed

+10
-29
lines changed

11 files changed

+10
-29
lines changed

examples/auth/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ Be sure to pay attention to the following features:
1212

1313
Open this example on [StackBlitz](https://stackblitz.com):
1414

15-
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/remix-run/react-router/tree/v6.0.0-beta.8/examples/auth?file=src/App.tsx)
15+
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/remix-run/react-router/tree/main/examples/auth?file=src/App.tsx)

examples/basic/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ This example demonstrates some of the basic features of React Router, including:
1212

1313
Open this example on [StackBlitz](https://stackblitz.com):
1414

15-
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/remix-run/react-router/tree/v6.0.0-beta.8/examples/basic?file=src/App.tsx)
15+
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/remix-run/react-router/tree/main/examples/basic?file=src/App.tsx)

examples/custom-filter-link/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ This example demonstrates how to use a query string parameter to mark a link as
66

77
Open this example on [StackBlitz](https://stackblitz.com):
88

9-
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/remix-run/react-router/tree/v6.0.0-beta.8/examples/custom-filter-link?file=src/App.tsx)
9+
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/remix-run/react-router/tree/main/examples/custom-filter-link?file=src/App.tsx)

examples/custom-link/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ This example demonstrates how to make a custom `<Link>` component to render some
66

77
Open this example on [StackBlitz](https://stackblitz.com):
88

9-
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/remix-run/react-router/tree/v6.0.0-beta.8/examples/custom-link?file=src/App.tsx)
9+
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/remix-run/react-router/tree/main/examples/custom-link?file=src/App.tsx)

examples/custom-query-parsing/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ It's a good example of how React Router's low-level hooks provide you with all t
88

99
Open this example on [StackBlitz](https://stackblitz.com):
1010

11-
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/remix-run/react-router/tree/v6.0.0-beta.8/examples/custom-query-parsing?file=src/App.tsx)
11+
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/remix-run/react-router/tree/main/examples/custom-query-parsing?file=src/App.tsx)

examples/lazy-loading/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ performance.
1414

1515
Open this example on [StackBlitz](https://stackblitz.com):
1616

17-
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/remix-run/react-router/tree/v6.0.0-beta.8/examples/lazy-loading?file=src/App.tsx)
17+
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/remix-run/react-router/tree/main/examples/lazy-loading?file=src/App.tsx)

examples/modal/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44

55
Open this example on [StackBlitz](https://stackblitz.com):
66

7-
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/remix-run/react-router/tree/v6.0.0-beta.8/examples/modal?file=src/App.tsx)
7+
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/remix-run/react-router/tree/main/examples/modal?file=src/App.tsx)

examples/route-objects/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ One interesting thing to note is that even if you don't use this hook directly,
88

99
Open this example on [StackBlitz](https://stackblitz.com):
1010

11-
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/remix-run/react-router/tree/v6.0.0-beta.8/examples/route-objects?file=src/App.tsx)
11+
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/remix-run/react-router/tree/main/examples/route-objects?file=src/App.tsx)

examples/search-params/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ In this example, we have a form to search for a user on GitHub and display their
88

99
Open this example on [StackBlitz](https://stackblitz.com):
1010

11-
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/remix-run/react-router/tree/v6.0.0-beta.8/examples/search-params?file=src/App.tsx)
11+
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/remix-run/react-router/tree/main/examples/search-params?file=src/App.tsx)

examples/ssr/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ On the server (see [src/entry.server.tsx](src/entry.server.tsx)), we use React R
1414

1515
Open this example on [StackBlitz](https://stackblitz.com):
1616

17-
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/remix-run/react-router/tree/v6.0.0-beta.8/examples/ssr?file=src/App.tsx)
17+
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/remix-run/react-router/tree/main/examples/ssr?file=src/App.tsx)

scripts/version.js

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -103,24 +103,6 @@ async function updateExamplesPackageConfig(example, transform) {
103103
await jsonfile.writeFile(file, json, { spaces: 2 });
104104
}
105105

106-
/**
107-
*
108-
* @param {string} example
109-
* @param {string} version
110-
*/
111-
async function updateExampleReadmeUrl(example, version) {
112-
let filePath = path.join(rootDir, "examples", example, "README.md");
113-
let fileBuffer = await fsp.readFile(filePath);
114-
let file = fileBuffer
115-
.toString()
116-
.replace(
117-
/https:\/\/stackblitz.com\/github\/remix-run\/react-router\/tree\/[^/+]+\/examples\/(.+?(?=\?)|.+?(?=\)))/,
118-
`https://stackblitz.com/github/remix-run/react-router/tree/${version}/examples/${example}`
119-
);
120-
121-
await fsp.writeFile(filePath, file, "utf8");
122-
}
123-
124106
async function run() {
125107
try {
126108
let args = process.argv.slice(2);
@@ -174,7 +156,6 @@ async function run() {
174156
let stat = await fsp.stat(path.join(examplesDir, example));
175157
if (!stat.isDirectory()) continue;
176158

177-
await updateExampleReadmeUrl(example, `v${version}`);
178159
await updateExamplesPackageConfig(example, config => {
179160
config.dependencies["react-router"] = version;
180161
config.dependencies["react-router-dom"] = version;

0 commit comments

Comments
 (0)