From fc79f8c134d561511bfd4cd23ea34d4f42e479e6 Mon Sep 17 00:00:00 2001 From: Daniel Adeyemo Date: Tue, 15 Oct 2024 15:23:16 +0100 Subject: [PATCH 1/2] Update guide.mdx Make explicit the fact that when cloning your template, you can create your own Wrangler file to make your project compatible with Cloudflare as a template. I am making this edit because I was confused when reading the docs as to how to make take my NodeJS project and turn it into a worker without going through the fresh intall to learn what config files I need. --- src/content/docs/workers/get-started/guide.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/content/docs/workers/get-started/guide.mdx b/src/content/docs/workers/get-started/guide.mdx index c33b4e39dc1f4bd..6b01cac196e4865 100644 --- a/src/content/docs/workers/get-started/guide.mdx +++ b/src/content/docs/workers/get-started/guide.mdx @@ -75,10 +75,10 @@ npm create cloudflare@latest -- --template - `bitbucket:user/repo` (Bitbucket) - `gitlab:user/repo` (GitLab) -At a minimum, template folders must contain the following: +It's likely that you have an existing project that isn't configured as a Cloudflare template. Before your project can qualify as a valid template, the folder must contain the following files at least: - `package.json` -- `wrangler.toml` +- `wrangler.toml` [See this](/workers/wrangler/configuration/#sample-wranglertoml-configuration) for an example of a Wrangler configuration file - `src/` containing a worker script referenced from `wrangler.toml` From 48b40b1f2a9f6d467ed98f5c7625f2c718ceeb92 Mon Sep 17 00:00:00 2001 From: ToriLindsay Date: Tue, 29 Oct 2024 09:46:39 +0000 Subject: [PATCH 2/2] Rewrite --- src/content/docs/workers/get-started/guide.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/content/docs/workers/get-started/guide.mdx b/src/content/docs/workers/get-started/guide.mdx index 6b01cac196e4865..36fb9b0b0157a8b 100644 --- a/src/content/docs/workers/get-started/guide.mdx +++ b/src/content/docs/workers/get-started/guide.mdx @@ -58,7 +58,7 @@ In your project directory, C3 will have generated the following:
-In addition to creating new projects from C3 templates, C3 also supports creating new projects from Git repositories. To create a new project from a Git repository, open your terminal and run: +In addition to creating new projects from C3 templates, C3 also supports creating new projects from existing Git repositories. To create a new project from an existing Git repository, open your terminal and run: ```sh npm create cloudflare@latest -- --template @@ -75,10 +75,10 @@ npm create cloudflare@latest -- --template - `bitbucket:user/repo` (Bitbucket) - `gitlab:user/repo` (GitLab) -It's likely that you have an existing project that isn't configured as a Cloudflare template. Before your project can qualify as a valid template, the folder must contain the following files at least: +Your existing template folder must contain the following files, at a minimum, to meet the requirements for Cloudflare Workers: - `package.json` -- `wrangler.toml` [See this](/workers/wrangler/configuration/#sample-wranglertoml-configuration) for an example of a Wrangler configuration file +- `wrangler.toml` [See sample Wrangler configuration](/workers/wrangler/configuration/#sample-wranglertoml-configuration) - `src/` containing a worker script referenced from `wrangler.toml`