Skip to content

Commit

Permalink
create-cloudflare: replace create-svelte with sv (#7031)
Browse files Browse the repository at this point in the history
* create-cloudflare: replace create-svelte with sv

* add changeset

* update

* update stable template

* fix experimental template

* update svelte e2e test

* prettier

---------
  • Loading branch information
codenoid authored Oct 25, 2024
1 parent 15ef013 commit eec2a70
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .changeset/hip-actors-thank.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"create-cloudflare": minor
---

create-svelte is soon be deprecated, use the new official replacement npx sv instead.
11 changes: 8 additions & 3 deletions packages/create-cloudflare/e2e-tests/frameworks.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -357,15 +357,20 @@ function getFrameworkTests(opts: {
svelte: {
promptHandlers: [
{
matcher: /Which Svelte app template/,
matcher: /Which template would you like/,
input: [keys.enter],
},
{
matcher: /Add type checking with TypeScript/,
matcher: /Add type checking with Typescript/,
input: [keys.down, keys.enter],
},
{
matcher: /Select additional options/,
matcher: /What would you like to add to your project/,
input: [keys.enter],
},
{
matcher:
/Which package manager do you want to install dependencies with/,
input: [keys.enter],
},
],
Expand Down
4 changes: 2 additions & 2 deletions packages/create-cloudflare/src/frameworks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
"create-vite": "5.5.4",
"create-remix": "2.13.1",
"create-solid": "0.5.13",
"create-svelte": "6.4.0",
"create-vue": "3.11.1",
"gatsby": "5.13.7",
"nuxi": "3.12.0"
"nuxi": "3.12.0",
"sv": "0.5.7"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import type { C3Context, PackageJson } from "types";
const { npm } = detectPackageManager();

const generate = async (ctx: C3Context) => {
await runFrameworkGenerator(ctx, [ctx.project.name]);
await runFrameworkGenerator(ctx, ["create", ctx.project.name]);

logRaw("");
};
Expand Down Expand Up @@ -97,7 +97,7 @@ const updateTypeDefinitions = (ctx: C3Context) => {
const config: TemplateConfig = {
configVersion: 1,
id: "svelte",
frameworkCli: "create-svelte",
frameworkCli: "sv",
displayName: "Svelte",
platform: "workers",
copyFiles: {
Expand Down
4 changes: 2 additions & 2 deletions packages/create-cloudflare/templates/svelte/c3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import type { C3Context, PackageJson } from "types";
const { npm } = detectPackageManager();

const generate = async (ctx: C3Context) => {
await runFrameworkGenerator(ctx, [ctx.project.name]);
await runFrameworkGenerator(ctx, ["create", ctx.project.name]);

logRaw("");
};
Expand Down Expand Up @@ -97,7 +97,7 @@ const updateTypeDefinitions = (ctx: C3Context) => {
const config: TemplateConfig = {
configVersion: 1,
id: "svelte",
frameworkCli: "create-svelte",
frameworkCli: "sv",
displayName: "Svelte",
platform: "pages",
copyFiles: {
Expand Down

0 comments on commit eec2a70

Please sign in to comment.