Skip to content

feat: replace routes and integrations with customProperties #142

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,19 @@
"name": "Feather Icons",
"description": "Add Feather Icons to your application.",
"phase": "add-on",
"modes": ["default"],
"modes": [
"default"
],
"type": "add-on",
"link": "https://github.com/egmaleta/qwik-feather-icons",
"routes": [
{
"url": "/demo-feather",
"name": "Feather Icons",
"path": "src/routes/demo-feather/index.tsx",
"jsName": "FeatherIconsDemo"
}
]
"customProperties": {
"routes": [
{
"url": "/demo-feather",
"name": "Feather Icons",
"path": "src/routes/demo-feather/index.tsx",
"jsName": "FeatherIconsDemo"
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ export default component$(() => {
<div class="px-2 font-bold">
<Link to="/">Home</Link>
</div>
<% for(const addOn of addOns) { for(const route of (addOn?.routes||[])?.filter(r => r.url && r.name)) { %>
<div class="px-2 font-bold"><Link href="<%= route.url %>"><%= route.name %></Link></div>
<% } } %>
<% for(const route of (routes||[]).filter(r => r.url && r.name)) { %>
<div class="px-2 font-bold"><Link href="<%= route.url %>"><%= route.name %></Link></div>
<% } %>
</nav>
<% if (integrations.filter(i => i.type === 'header-user').length > 0) { %>
<div>
Expand Down
46 changes: 25 additions & 21 deletions frameworks/react-cra/add-ons/clerk/info.json
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jherr this more like it?

Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,31 @@
"name": "Clerk",
"description": "Add Clerk authentication to your application.",
"phase": "add-on",
"modes": ["file-router"],
"modes": [
"file-router"
],
"type": "add-on",
"link": "https://clerk.com",
"routes": [
{
"url": "/demo/clerk",
"name": "Clerk",
"path": "src/routes/demo.clerk.tsx",
"jsName": "ClerkDemo"
}
],
"integrations": [
{
"type": "header-user",
"jsName": "ClerkHeader",
"path": "src/integrations/clerk/header-user.tsx"
},
{
"type": "provider",
"jsName": "ClerkProvider",
"path": "src/integrations/clerk/provider.tsx"
}
]
"customProperties": {
"routes": [
{
"url": "/demo/clerk",
"name": "Clerk",
"path": "src/routes/demo.clerk.tsx",
"jsName": "ClerkDemo"
}
],
"integrations": [
{
"type": "header-user",
"jsName": "ClerkHeader",
"path": "src/integrations/clerk/header-user.tsx"
},
{
"type": "provider",
"jsName": "ClerkProvider",
"path": "src/integrations/clerk/provider.tsx"
}
]
}
}
34 changes: 19 additions & 15 deletions frameworks/react-cra/add-ons/convex/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,24 @@
"link": "https://convex.dev",
"phase": "add-on",
"type": "add-on",
"modes": ["file-router"],
"routes": [
{
"url": "/demo/convex",
"name": "Convex",
"path": "src/routes/demo.convex.tsx",
"jsName": "ConvexDemo"
}
"modes": [
"file-router"
],
"integrations": [
{
"type": "provider",
"path": "src/integrations/convex/provider.tsx",
"jsName": "ConvexProvider"
}
]
"customProperties": {
"routes": [
{
"url": "/demo/convex",
"name": "Convex",
"path": "src/routes/demo.convex.tsx",
"jsName": "ConvexDemo"
}
],
"integrations": [
{
"type": "provider",
"path": "src/integrations/convex/provider.tsx",
"jsName": "ConvexProvider"
}
]
}
}
37 changes: 21 additions & 16 deletions frameworks/react-cra/add-ons/form/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,11 @@
"description": "TanStack Form",
"phase": "add-on",
"type": "add-on",
"modes": ["file-router", "code-router"],
"link": "https://tanstack.com/form/latest",
"routes": [
{
"url": "/demo/form/simple",
"name": "Simple Form",
"path": "src/routes/demo.form.simple.tsx",
"jsName": "FormSimpleDemo"
},
{
"url": "/demo/form/address",
"name": "Address Form",
"path": "src/routes/demo.form.address.tsx",
"jsName": "FormAddressDemo"
}
"modes": [
"file-router",
"code-router"
],
"link": "https://tanstack.com/form/latest",
"shadcnComponents": [
"button",
"select",
Expand All @@ -27,5 +16,21 @@
"slider",
"switch",
"label"
]
],
"customProperties": {
"routes": [
{
"url": "/demo/form/simple",
"name": "Simple Form",
"path": "src/routes/demo.form.simple.tsx",
"jsName": "FormSimpleDemo"
},
{
"url": "/demo/form/address",
"name": "Address Form",
"path": "src/routes/demo.form.address.tsx",
"jsName": "FormAddressDemo"
}
]
}
}
24 changes: 15 additions & 9 deletions frameworks/react-cra/add-ons/neon/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,20 @@
"link": "https://neon.com",
"phase": "add-on",
"type": "add-on",
"modes": ["file-router"],
"routes": [
{
"url": "/demo/neon",
"name": "Neon",
"path": "src/routes/demo.neon.tsx",
"jsName": "NeonDemo"
}
"modes": [
"file-router"
],
"dependsOn": ["start"]
"dependsOn": [
"start"
],
"customProperties": {
"routes": [
{
"url": "/demo/neon",
"name": "Neon",
"path": "src/routes/demo.neon.tsx",
"jsName": "NeonDemo"
}
]
}
}
24 changes: 15 additions & 9 deletions frameworks/react-cra/add-ons/sentry/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,21 @@
"phase": "setup",
"description": "Add Sentry for error monitoring, tracing, and session replays (requires Start).",
"link": "https://sentry.com/",
"modes": ["file-router"],
"modes": [
"file-router"
],
"type": "add-on",
"routes": [
{
"url": "/demo/sentry/testing",
"name": "Sentry",
"path": "src/routes/demo.sentry.testing.tsx",
"jsName": "SentryDemo"
}
"dependsOn": [
"start"
],
"dependsOn": ["start"]
"customProperties": {
"routes": [
{
"url": "/demo/sentry/testing",
"name": "Sentry",
"path": "src/routes/demo.sentry.testing.tsx",
"jsName": "SentryDemo"
}
]
}
}
38 changes: 22 additions & 16 deletions frameworks/react-cra/add-ons/start/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,33 @@
"phase": "setup",
"description": "Add TanStack Start for SSR, API endpoints, and more.",
"link": "https://tanstack.com/start/latest",
"modes": ["file-router"],
"modes": [
"file-router"
],
"type": "add-on",
"warning": "TanStack Start is not yet at 1.0 and may change significantly or not be compatible with other add-ons.\nMigrating to Start might require deleting node_modules and re-installing.",
"routes": [
{
"url": "/demo/start/server-funcs",
"name": "Start - Server Functions",
"path": "src/routes/demo.start.server-funcs.tsx",
"jsName": "StartServerFuncsDemo"
},
{
"url": "/demo/start/api-request",
"name": "Start - API Request",
"path": "src/routes/demo.start.api-request.tsx",
"jsName": "StartApiRequestDemo"
}
],
"deletedFiles": [
"./index.html",
"./src/main.tsx",
"./src/App.css"
],
"addOnSpecialSteps": ["rimraf-node-modules"]
"addOnSpecialSteps": [
"rimraf-node-modules"
],
"customProperties": {
"routes": [
{
"url": "/demo/start/server-funcs",
"name": "Start - Server Functions",
"path": "src/routes/demo.start.server-funcs.tsx",
"jsName": "StartServerFuncsDemo"
},
{
"url": "/demo/start/api-request",
"name": "Start - API Request",
"path": "src/routes/demo.start.api-request.tsx",
"jsName": "StartApiRequestDemo"
}
]
}
}
23 changes: 14 additions & 9 deletions frameworks/react-cra/add-ons/store/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,18 @@
"phase": "add-on",
"link": "https://tanstack.com/store/latest",
"type": "add-on",
"modes": ["file-router", "code-router"],
"routes": [
{
"url": "/demo/store",
"name": "Store",
"path": "src/routes/demo.store.tsx",
"jsName": "StoreDemo"
}
]
"modes": [
"file-router",
"code-router"
],
"customProperties": {
"routes": [
{
"url": "/demo/store",
"name": "Store",
"path": "src/routes/demo.store.tsx",
"jsName": "StoreDemo"
}
]
}
}
23 changes: 14 additions & 9 deletions frameworks/react-cra/add-ons/table/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,20 @@
"name": "Table",
"description": "Integrate TanStack Table into your application.",
"phase": "add-on",
"modes": ["file-router", "code-router"],
"modes": [
"file-router",
"code-router"
],
"link": "https://tanstack.com/table/latest",
"type": "add-on",
"routes": [
{
"url": "/demo/table",
"name": "TanStack Table",
"path": "src/routes/demo.table.tsx",
"jsName": "TableDemo"
}
]
"customProperties": {
"routes": [
{
"url": "/demo/table",
"name": "TanStack Table",
"path": "src/routes/demo.table.tsx",
"jsName": "TableDemo"
}
]
}
}
Loading