diff --git a/packages/wrangler/src/__tests__/index.test.ts b/packages/wrangler/src/__tests__/index.test.ts index 51f12839ddc9..4cce2fc4ed70 100644 --- a/packages/wrangler/src/__tests__/index.test.ts +++ b/packages/wrangler/src/__tests__/index.test.ts @@ -170,6 +170,8 @@ describe("wrangler", () => { }); expect(fs.existsSync("./tsconfig.json")).toBe(false); expect(mockPackageManager.install).toHaveBeenCalled(); + expect(packageJson.scripts.start).toBe("wrangler dev src/index.ts"); + expect(packageJson.scripts.deploy).toBe("wrangler publish src/index.ts"); }); it("should not touch an existing package.json in the same directory", async () => { diff --git a/packages/wrangler/src/index.tsx b/packages/wrangler/src/index.tsx index ab34c89dc974..0bd74d2855e8 100644 --- a/packages/wrangler/src/index.tsx +++ b/packages/wrangler/src/index.tsx @@ -229,6 +229,10 @@ export async function main(argv: string[]): Promise { { name: "worker", version: "0.0.0", + scripts: { + start: "wrangler dev src/index.ts", + deploy: "wrangler publish src/index.ts", + }, devDependencies: { wrangler: wranglerVersion, },