Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update some C3 docs to mention wrangler.json #19125

Open
wants to merge 1 commit into
base: production
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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

Expand All @@ -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.
27 changes: 17 additions & 10 deletions src/content/docs/pages/get-started/c3.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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).

Expand Down Expand Up @@ -163,8 +170,8 @@ bun create cloudflare@latest [--] [<DIRECTORY>] [OPTIONS] [-- <NESTED ARGS...>]
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.

Expand Down Expand Up @@ -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.

<PackageManagers
type="create"
type="create"
pkg="cloudflare@latest"
args="telemetry disable"
/>
Expand All @@ -243,15 +250,15 @@ export CREATE_CLOUDFLARE_TELEMETRY_DISABLED=1
You can check the status of telemetry collection at any time.

<PackageManagers
type="create"
pkg="cloudflare@latest"
args="telemetry status"
type="create"
pkg="cloudflare@latest"
args="telemetry status"
/>

You can always re-enable telemetry collection.

<PackageManagers
type="create"
pkg="cloudflare@latest"
args="telemetry enable"
type="create"
pkg="cloudflare@latest"
args="telemetry enable"
/>
Loading