cloudflare / workers-sdk

⛅️ Home to Wrangler, the CLI for Cloudflare Workers®
https://developers.cloudflare.com/workers/
Apache License 2.0
2.71k stars 712 forks source link

🚀 Feature Request: Remove deprecated commands & config #5071

Open penalosa opened 8 months ago

penalosa commented 8 months ago

Describe the solution

Remove deprecated commands & config

YOWNTeam commented 8 months ago

I came here to report a related issue.

I want to add Wrangler for using workers to an existing Sites application and found these directions: https://developers.cloudflare.com/workers/configuration/sites/start-from-existing/

When running wrangler init -y, it warns that init is deprecated and proceeds to try to create a new application.

admah commented 8 months ago

@YOWNTeam wrangler init now uses a CLI to scaffold new projects (docs). You can use that to create and deploy from many web frameworks - including some static site frameworks. That would be the recommended path forward.

Is there a reason you're wanting to use Workers Sites instead?

YOWNTeam commented 8 months ago

@admah Yes, I found that out the hard way yesterday. I started over today using CF's pages docs, instead of the workers docs. For context, I had an existing Astro based application I was working to move to CLoudflare and followed a guide from Astro's guides resulting in a lot of misconfiguration, trial and error, and ambiguous issues.

FWIW, the wrangler init function will completely overwrite a current project directory as a new project, so the "start from existing" document can be super confusing. Although, I understand now that I should have been focused on Pages/Functions instead of workers.

The Pages docs are great, and the command line tool is a breath of fresh air! Thank you!