From 696a86623c92e65d942067e85ba2b59e5d17195a Mon Sep 17 00:00:00 2001 From: Samuel Macleod Date: Fri, 10 Jan 2025 13:52:20 +0000 Subject: [PATCH] Update some C3 docs to mention wrangler.json --- .../workers/get-started/c3-and-wrangler.mdx | 13 +++++---- src/content/docs/pages/get-started/c3.mdx | 27 ++++++++++++------- 2 files changed, 23 insertions(+), 17 deletions(-) diff --git a/src/content/docs/learning-paths/workers/get-started/c3-and-wrangler.mdx b/src/content/docs/learning-paths/workers/get-started/c3-and-wrangler.mdx index 11e721159c8829..b766569ddd4c92 100644 --- a/src/content/docs/learning-paths/workers/get-started/c3-and-wrangler.mdx +++ b/src/content/docs/learning-paths/workers/get-started/c3-and-wrangler.mdx @@ -3,7 +3,6 @@ title: C3 & Wrangler pcx_content_type: learning-unit sidebar: order: 1 - --- Before deploying your first Worker, learn about the CLI tools you will use to build and deploy your Worker project. @@ -16,8 +15,8 @@ You can build and develop your Worker on the Cloudflare dashboard, without needi The Cloudflare Developer Platform ecosystem has two command-line interfaces (CLI): -* C3: To create new projects. -* Wrangler: To build and deploy your projects. +- C3: To create new projects. +- Wrangler: To build and deploy your projects. ## C3 @@ -35,15 +34,15 @@ When you run C3 to create your project, C3 will install the latest version of Wr ## Source of truth -If you are building your Worker on the Cloudflare dashboard, you will set up your project configuration (such as environment variables, bindings, and routes) through the dashboard. If you are building your project programmatically using C3 and Wrangler, you will rely on a [`wrangler.toml`](/workers/wrangler/configuration/) file to configure your Worker. +If you are building your Worker on the Cloudflare dashboard, you will set up your project configuration (such as environment variables, bindings, and routes) through the dashboard. If you are building your project programmatically using C3 and Wrangler, you will rely on a [`wrangler.json`/`wrangler.toml`](/workers/wrangler/configuration/) file to configure your Worker. -Cloudflare recommends choosing and using one [source of truth](/workers/wrangler/configuration/#source-of-truth), the dashboard or `wrangler.toml`, to avoid errors in your project. +Cloudflare recommends choosing and using one [source of truth](/workers/wrangler/configuration/#source-of-truth), the dashboard or `wrangler.json`/`wrangler.toml`, to avoid errors in your project. ## Summary By reading this page, you have learned: -* How to use C3 to create new Workers and Pages projects. -* How to use Wrangler to develop, configure, and delete your projects. +- How to use C3 to create new Workers and Pages projects. +- How to use Wrangler to develop, configure, and delete your projects. In the next section, you will learn more about the Cloudflare dashboard before moving on to deploy your first Worker. diff --git a/src/content/docs/pages/get-started/c3.mdx b/src/content/docs/pages/get-started/c3.mdx index c004764019398a..e1656f87bc342b 100644 --- a/src/content/docs/pages/get-started/c3.mdx +++ b/src/content/docs/pages/get-started/c3.mdx @@ -10,7 +10,14 @@ description: Use C3 (`create-cloudflare` CLI) to set up and deploy new deployment. --- -import { Render, TabItem, Tabs, Type, MetaInfo, PackageManagers } from "~/components"; +import { + Render, + TabItem, + Tabs, + Type, + MetaInfo, + PackageManagers, +} from "~/components"; Cloudflare provides a CLI command for creating new Workers and Pages projects — `npm create cloudflare`, powered by the [`create-cloudflare` package](https://www.npmjs.com/package/create-cloudflare). @@ -163,8 +170,8 @@ bun create cloudflare@latest [--] [] [OPTIONS] [-- ] At a minimum, templates must contain the following: - `package.json` - - `wrangler.toml` - - `src/` containing a worker script referenced from `wrangler.toml` + - `wrangler.json` or `wrangler.toml` + - `src/` containing a worker script referenced from `wrangler.json`/`wrangler.toml` See the [templates folder](https://github.com/cloudflare/workers-sdk/tree/main/packages/create-cloudflare/templates) of this repo for more examples. @@ -229,7 +236,7 @@ Cloudflare collects anonymous usage data to improve `create-cloudflare` over tim You can opt-out if you do not wish to share any information. @@ -243,15 +250,15 @@ export CREATE_CLOUDFLARE_TELEMETRY_DISABLED=1 You can check the status of telemetry collection at any time. You can always re-enable telemetry collection.