Skip to content

Commit e5aefd9

Browse files
committed
feat: add zephyr as an option
1 parent b353733 commit e5aefd9

File tree

6 files changed

+87
-2
lines changed

6 files changed

+87
-2
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
import { createFileRoute } from '@tanstack/react-router'
2+
3+
export const Route = createFileRoute('/demo/zephyr')({
4+
component: ZephyrDemo,
5+
})
6+
7+
function ZephyrDemo() {
8+
return (
9+
<div className="p-8 max-w-4xl mx-auto">
10+
<h1 className="text-3xl font-bold mb-6">Zephyr Cloud Demo</h1>
11+
12+
<div className="space-y-6">
13+
<div className="bg-blue-50 border border-blue-200 rounded-lg p-6">
14+
<h2 className="text-xl font-semibold mb-3 text-blue-800">🚀 Deployment Ready</h2>
15+
<p className="text-blue-700">
16+
Your application is configured with Zephyr Cloud! Simply run <code className="bg-blue-100 px-2 py-1 rounded">npm run build</code> to deploy your app.
17+
</p>
18+
</div>
19+
20+
<div className="bg-green-50 border border-green-200 rounded-lg p-6">
21+
<h2 className="text-xl font-semibold mb-3 text-green-800">✨ Key Features</h2>
22+
<ul className="list-disc list-inside text-green-700 space-y-2">
23+
<li>Micro-frontend architecture support</li>
24+
<li>Automatic deployments to multiple environments</li>
25+
<li>Version rollback and roll-forward capabilities</li>
26+
<li>Chrome extension for easy app access</li>
27+
<li>Multi-cloud provider support (AWS, Cloudflare, Netlify)</li>
28+
</ul>
29+
</div>
30+
31+
<div className="bg-purple-50 border border-purple-200 rounded-lg p-6">
32+
<h2 className="text-xl font-semibold mb-3 text-purple-800">🔧 Next Steps</h2>
33+
<ol className="list-decimal list-inside text-purple-700 space-y-2">
34+
<li>Initialize a git repository: <code className="bg-purple-100 px-2 py-1 rounded">git init</code></li>
35+
<li>Commit your changes: <code className="bg-purple-100 px-2 py-1 rounded">git add . && git commit -m "Initial commit"</code></li>
36+
<li>Build and deploy: <code className="bg-purple-100 px-2 py-1 rounded">npm run build</code></li>
37+
<li>Follow the CLI prompts to log in and deploy</li>
38+
</ol>
39+
</div>
40+
41+
<div className="bg-gray-50 border border-gray-200 rounded-lg p-6">
42+
<h2 className="text-xl font-semibold mb-3 text-gray-800">📚 Learn More</h2>
43+
<p className="text-gray-700">
44+
Visit the{' '}
45+
<a
46+
href="https://docs.zephyr-cloud.io/"
47+
target="_blank"
48+
rel="noopener noreferrer"
49+
className="text-blue-600 hover:text-blue-800 underline"
50+
>
51+
Zephyr Cloud documentation
52+
</a>{' '}
53+
to explore advanced features and integrations.
54+
</p>
55+
</div>
56+
</div>
57+
</div>
58+
)
59+
}

frameworks/react-cra/add-ons/zephyr/assets/vite.config.ts.append

Whitespace-only changes.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"name": "Zephyr Cloud",
3+
"description": "The fastest way to go from idea to production.",
4+
"phase": "add-on",
5+
"modes": ["file-router", "code-router"],
6+
"link": "https://zephyr-cloud.io/",
7+
"type": "add-on"
8+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"dependencies": {
3+
"vite-plugin-zephyr": "latest"
4+
}
5+
}
Lines changed: 12 additions & 0 deletions
Loading

frameworks/react-cra/project/base/vite.config.ts.ejs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@ import viteReact from "@vitejs/plugin-react";<% if (tailwind) { %>
33
import tailwindcss from "@tailwindcss/vite";
44
<% } %><%if (fileRouter) { %>
55
import { TanStackRouterVite } from "@tanstack/router-plugin/vite";<% } %><% if (addOnEnabled['module-federation']) { %>
6-
import { federation } from "@module-federation/vite";<% } %>
6+
import { federation } from "@module-federation/vite";<% } %><% if (addOnEnabled.zephyr) { %>
7+
import { withZephyr } from 'vite-plugin-zephyr';<% } %>
78
import { resolve } from "node:path";<% if (addOnEnabled['module-federation']) { %>
89
import federationConfig from "./module-federation.config.js";
910
<% } %>
1011

1112
// https://vitejs.dev/config/
1213
export default defineConfig({
13-
plugins: [<% if(fileRouter) { %>TanStackRouterVite({ autoCodeSplitting: true }), <% } %>viteReact()<% if (tailwind) { %>, tailwindcss()<% } %><% if (addOnEnabled['module-federation']) { %>, federation(federationConfig)<% } %>],
14+
plugins: [<% if(fileRouter) { %>TanStackRouterVite({ autoCodeSplitting: true }), <% } %>viteReact()<% if (tailwind) { %>, tailwindcss()<% } %><% if (addOnEnabled['module-federation']) { %>, federation(federationConfig)<% } %><% if (addOnEnabled.zephyr) { %>, withZephyr(<% if (addOnEnabled['module-federation']) { %>{ mfConfig: federationConfig }<% } %>)<% } %>],
1415
test: {
1516
globals: true,
1617
environment: "jsdom",

0 commit comments

Comments
 (0)