Skip to content

Commit

Permalink
Fix build-cf-types task for win32
Browse files Browse the repository at this point in the history
  • Loading branch information
jculvey committed Feb 16, 2024
1 parent afb22c0 commit 05ee253
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/create-cloudflare/templates/svelte/c3.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { platform } from "node:os";
import { logRaw, updateStatus } from "@cloudflare/cli";
import { blue, brandColor, dim } from "@cloudflare/cli/colors";
import { transformFile } from "helpers/codemod";
Expand Down Expand Up @@ -112,9 +113,10 @@ const config: TemplateConfig = {
};

if (usesTypescript(ctx)) {
const mv = platform() === "win32" ? "move" : "mv";
scripts = {
...scripts,
"build-cf-types": "wrangler types && mv worker-configuration.d.ts src/",
"build-cf-types": `wrangler types && ${mv} worker-configuration.d.ts src/`,
};
}

Expand Down

0 comments on commit 05ee253

Please sign in to comment.