Skip to content

Commit

Permalink
feat: add svelte frontend templates for create command (matter-labs#129)
Browse files Browse the repository at this point in the history
  • Loading branch information
unrep authored Mar 20, 2024
1 parent 3928548 commit d72f445
Showing 1 changed file with 77 additions and 1 deletion.
78 changes: 77 additions & 1 deletion src/commands/create/groups/frontend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@ import { askForTemplate, setupTemplate, getUniqueValues, askForPackageManager, s
import type { GenericTemplate } from "../index.js";

type Template = GenericTemplate & {
framework: "Vue - Nuxt 3" | "Vue - Vite" | "React - Next.js" | "React - Vite";
framework:
| "Vue - Nuxt 3"
| "Vue - Vite"
| "React - Next.js"
| "React - Vite"
| "Svelte - SvelteKit"
| "Svelte - Vite";
ethereumFramework: "Ethers v5" | "Ethers v6" | "viem";
requiresWalletConnectProjectId?: boolean;
};
Expand Down Expand Up @@ -162,6 +168,76 @@ export const templates: Template[] = [
path: "templates/react/vite-ethers5",
git: "https://github.com/matter-labs/zksync-frontend-templates",
},

/* Svelte SvelteKit */
{
name: "wagmi",
value: "sveltekit_wagmi",
framework: "Svelte - SvelteKit",
ethereumFramework: "viem",
path: "templates/svelte/sveltekit-wagmi",
git: "https://github.com/matter-labs/zksync-frontend-templates",
},
{
name: "wagmi + Web3Modal",
value: "sveltekit_wagmi_web3modal",
framework: "Svelte - SvelteKit",
ethereumFramework: "viem",
requiresWalletConnectProjectId: true,
path: "templates/svelte/sveltekit-wagmi-web3modal",
git: "https://github.com/matter-labs/zksync-frontend-templates",
},
{
name: "Ethers v6",
value: "sveltekit_ethers6",
framework: "Svelte - SvelteKit",
ethereumFramework: "Ethers v6",
path: "templates/svelte/sveltekit-ethers",
git: "https://github.com/matter-labs/zksync-frontend-templates",
},
{
name: "Ethers v5",
value: "sveltekit_ethers5",
framework: "Svelte - SvelteKit",
ethereumFramework: "Ethers v5",
path: "templates/svelte/sveltekit-ethers5",
git: "https://github.com/matter-labs/zksync-frontend-templates",
},

/* Svelte Vite */
{
name: "wagmi",
value: "svelte_vite_wagmi",
framework: "Svelte - Vite",
ethereumFramework: "viem",
path: "templates/svelte/vite-wagmi",
git: "https://github.com/matter-labs/zksync-frontend-templates",
},
{
name: "wagmi + Web3Modal",
value: "svelte_vite_wagmi_web3modal",
framework: "Svelte - Vite",
ethereumFramework: "viem",
requiresWalletConnectProjectId: true,
path: "templates/svelte/vite-wagmi-web3modal",
git: "https://github.com/matter-labs/zksync-frontend-templates",
},
{
name: "Ethers v6",
value: "svelte_vite_ethers6",
framework: "Svelte - Vite",
ethereumFramework: "Ethers v6",
path: "templates/svelte/vite-ethers",
git: "https://github.com/matter-labs/zksync-frontend-templates",
},
{
name: "Ethers v5",
value: "svelte_vite_ethers5",
framework: "Svelte - Vite",
ethereumFramework: "Ethers v5",
path: "templates/svelte/vite-ethers5",
git: "https://github.com/matter-labs/zksync-frontend-templates",
},
];

export default async (folderLocation: string, folderRelativePath: string, templateKey?: string) => {
Expand Down

0 comments on commit d72f445

Please sign in to comment.