How do you generate cloudflare/templates with Wrangler?
The documentation in the cloudflare/templates repository says that "cloudflare-create" is sunsetting and to use "wrangler generate" instead. However, the
wrangler generate
command has no documentation for how to do this either.5 Replies
I'm not sure what you mean? From
[email protected]
:
The readme
on the repo hasn't updated in a while, but it should still work...I suppose the part that wasn't clear was that you do not need to specify a
[template]
when using generate
in order to get a specific template from the cloudflare/templates
repository.
It implies that you need to specify a template path, like workers-typescript
, but that throws an error that the template can't be found.
I resolved this by not specifying a template, at which point it asked me which template I wanted to use.I think the reason there was that the template is
worker-typescript
, not workers-typescript
: You were able to do
wrangler generate xyz worker-typescript
?Yes