-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove @remix-run/routes-option-adapter
- Loading branch information
1 parent
ec6db8c
commit 15a6d3a
Showing
3 changed files
with
37 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,37 @@ | ||
import { type RouteConfig } from "@remix-run/route-config"; | ||
import { remixRoutesOptionAdapter } from "@remix-run/routes-option-adapter"; | ||
|
||
export const routes: RouteConfig = await remixRoutesOptionAdapter( | ||
(defineRoutes) => { | ||
return defineRoutes((route) => { | ||
route("/__components", "components/_playground/playground.tsx"); | ||
route("/color-scheme", "actions/color-scheme.ts"); | ||
|
||
route("/", "pages/home.tsx", { index: true }); | ||
route("/brand", "pages/brand.tsx"); | ||
route("/healthcheck", "pages/healthcheck.tsx"); | ||
|
||
// Pre v7 inline API docs | ||
route("/en/:ref", "pages/docs-layout.tsx", { id: "v6-guides" }, () => { | ||
route("", "pages/docs-index.tsx", { | ||
index: true, | ||
id: "v6-index", | ||
}); | ||
route("*", "pages/doc.tsx", { id: "v6-guide" }); | ||
}); | ||
|
||
route("/v6/*", "pages/redirect-v6-doc.tsx"); | ||
route("/v7/api/:pkg/*", "pages/redirect-v7-doc.tsx"); | ||
route("/v7/docs/*", "pages/redirect-v7-doc.tsx", { | ||
id: "v7-docs-redirect", | ||
}); | ||
|
||
route("/:ref?/docs", "pages/docs-layout.tsx", { id: "docs" }, () => { | ||
route("", "pages/docs-index.tsx", { index: true }); | ||
route("*", "pages/doc.tsx"); | ||
}); | ||
|
||
// TODO: uncomment after v7 | ||
// route("/:ref?/api", "pages/api-redirect.ts"); | ||
|
||
route("/:ref?/api/:pkg", "pages/api-layout.tsx", { id: "api" }, () => { | ||
route("", "pages/api-index.tsx", { index: true }); | ||
route("*", "pages/api-doc.tsx"); | ||
}); | ||
|
||
route("/*", "pages/notfound.tsx"); | ||
}); | ||
} | ||
); | ||
import { type RouteConfig, route, index } from "@remix-run/route-config"; | ||
|
||
export const routes: RouteConfig = [ | ||
route("/__components", "components/_playground/playground.tsx"), | ||
route("/color-scheme", "actions/color-scheme.ts"), | ||
|
||
index("pages/home.tsx"), | ||
route("/brand", "pages/brand.tsx"), | ||
route("/healthcheck", "pages/healthcheck.tsx"), | ||
|
||
// Pre v7 inline API docs | ||
route("/en/:ref", "pages/docs-layout.tsx", { id: "v6-guides" }, [ | ||
index("pages/docs-index.tsx", { id: "v6-index" }), | ||
route("*", "pages/doc.tsx", { id: "v6-guide" }), | ||
]), | ||
|
||
route("/v6/*", "pages/redirect-v6-doc.tsx"), | ||
route("/v7/api/:pkg/*", "pages/redirect-v7-doc.tsx"), | ||
route("/v7/docs/*", "pages/redirect-v7-doc.tsx", { | ||
id: "v7-docs-redirect", | ||
}), | ||
|
||
route("/:ref?/docs", "pages/docs-layout.tsx", { id: "docs" }, [ | ||
index("pages/docs-index.tsx"), | ||
route("*", "pages/doc.tsx"), | ||
]), | ||
|
||
// TODO: uncomment after v7 | ||
// route("/:ref?/api", "pages/api-redirect.ts"), | ||
|
||
route("/:ref?/api/:pkg", "pages/api-layout.tsx", { id: "api" }, [ | ||
index("pages/api-index.tsx"), | ||
route("*", "pages/api-doc.tsx"), | ||
]), | ||
|
||
route("/*", "pages/notfound.tsx"), | ||
]; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters