Skip to content

Commit 6de56f0

Browse files
deloreyjkodster28
andauthored
fix: #19464 remove @latest from yarn create cloudflare commands (#19470)
* fix: #19464 remove @latest from yarn create cloudflare commands * Update to packagemanagers where appropriate * remove extra lines --------- Co-authored-by: [email protected] <[email protected]> Co-authored-by: kodster28 <[email protected]>
1 parent e537c17 commit 6de56f0

File tree

6 files changed

+24
-78
lines changed

6 files changed

+24
-78
lines changed

src/content/docs/developer-spotlight/tutorials/create-sitemap-from-sanity-cms.mdx

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ spotlight:
1717
author_bio_source: LinkedIn
1818
---
1919

20-
import { TabItem, Tabs, WranglerConfig } from "~/components";
20+
import { TabItem, Tabs, WranglerConfig, PackageManagers } from "~/components";
2121

2222
In this tutorial, you will put together a Cloudflare Worker that creates and serves a sitemap using data from [Sanity.io](https://www.sanity.io), a headless CMS.
2323

@@ -44,25 +44,7 @@ While you can create Workers in the Cloudflare dashboard, it is a best practice
4444

4545
Create a new Worker project using [C3](/pages/get-started/c3/) (`create-cloudflare` CLI):
4646

47-
<Tabs> <TabItem label="pnpm">
48-
49-
```sh
50-
pnpm create cloudflare@latest
51-
```
52-
53-
</TabItem> <TabItem label="npm">
54-
55-
```sh
56-
npm create cloudflare@latest
57-
```
58-
59-
</TabItem> <TabItem label="yarn">
60-
61-
```sh
62-
yarn create cloudflare@latest
63-
```
64-
65-
</TabItem> </Tabs>
47+
<PackageManagers type="create" pkg="cloudflare@latest" />
6648

6749
In this tutorial, the Worker will be named `cms-sitemap`.
6850

src/content/docs/developer-spotlight/tutorials/creating-a-recommendation-api.mdx

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,13 @@ sidebar:
2222
order: 2
2323
---
2424

25-
import { Render, TabItem, Tabs, WranglerConfig } from "~/components";
25+
import {
26+
Render,
27+
TabItem,
28+
Tabs,
29+
PackageManagers,
30+
WranglerConfig,
31+
} from "~/components";
2632

2733
E-commerce and media sites often work on increasing the average transaction value to boost profitability. One of the strategies to increase the average transaction value is "cross-selling," which involves recommending related products. Cloudflare offers a range of products designed to build mechanisms for retrieving data related to the products users are viewing or requesting. In this tutorial, you will experience developing functionalities necessary for cross-selling by creating APIs for related product searches and product recommendations.
2834

@@ -61,25 +67,11 @@ First, let's create a Cloudflare Workers project.
6167
To efficiently create and manage multiple APIs, let's use [`Hono`](https://hono.dev). Hono is an open-source application framework released by a Cloudflare Developer Advocate. It is lightweight and allows for the creation of multiple API paths, as well as efficient request and response handling.
6268
Open your command line interface (CLI) and run the following command:
6369

64-
<Tabs> <TabItem label="npm">
65-
66-
```sh
67-
npm create cloudflare@latest cross-sell-api -- --framework hono
68-
```
69-
70-
</TabItem> <TabItem label="yarn">
71-
72-
```sh
73-
yarn create cloudflare@latest cross-sell-api -- --framework hono
74-
```
75-
76-
</TabItem> <TabItem label="pnpm">
77-
78-
```sh
79-
pnpm create cloudflare@latest cross-sell-api -- --framework hono
80-
```
81-
82-
</TabItem> </Tabs>
70+
<PackageManagers
71+
type="create"
72+
pkg="cloudflare@latest"
73+
args={"cross-sell-api --framework=hono"}
74+
/>
8375

8476
If this is your first time running the `C3` command, you will be asked whether you want to install it. Confirm that the package name for installation is `create-cloudflare` and answer `y`.
8577

src/content/docs/pages/get-started/c3.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ npm create cloudflare@latest [--] [<DIRECTORY>] [OPTIONS] [-- <NESTED ARGS...>]
8080
</TabItem> <TabItem label="yarn">
8181

8282
```sh
83-
yarn create cloudflare@latest [--] [<DIRECTORY>] [OPTIONS] [-- <NESTED ARGS...>]
83+
yarn create cloudflare [--] [<DIRECTORY>] [OPTIONS] [-- <NESTED ARGS...>]
8484
```
8585

8686
</TabItem> <TabItem label="pnpm">

src/content/docs/turnstile/tutorials/protecting-your-payment-form-from-attackers-bots-using-turnstile.mdx

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ sidebar:
2222
order: 2
2323
---
2424

25-
import { Render, TabItem, Tabs } from "~/components";
25+
import { Render, TabItem, Tabs, PackageManagers } from "~/components";
2626

2727
This tutorial shows how you can build a more secure payment form using Turnstile. You can learn how to block bot access on the checkout page and trigger additional authentication flows by integrating Turnstile with Stripe.
2828

@@ -49,25 +49,11 @@ To efficiently create and manage multiple APIs, let's use [`Hono`](https://hono.
4949

5050
Open your command line interface (CLI) and run the following command:
5151

52-
<Tabs> <TabItem label="npm">
53-
54-
```sh
55-
npm create cloudflare@latest secure-payment-form -- --framework hono
56-
```
57-
58-
</TabItem> <TabItem label="yarn">
59-
60-
```sh
61-
yarn create cloudflare@latest secure-payment-form -- --framework hono
62-
```
63-
64-
</TabItem> <TabItem label="pnpm">
65-
66-
```sh
67-
pnpm create cloudflare@latest secure-payment-form -- --framework hono
68-
```
69-
70-
</TabItem> </Tabs>
52+
<PackageManagers
53+
type="create"
54+
pkg="cloudflare@latest"
55+
args={"secure-payment-form --framework=hono"}
56+
/>
7157

7258
If this is your first time running the `C3` command, you will be asked whether you want to install it. Confirm that the package name for installation is `create-cloudflare` and answer `y`.
7359

src/content/partials/workers/c3-run-command-no-directory.mdx

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,6 @@
22
{}
33
---
44

5-
import { TabItem, Tabs } from "~/components";
5+
import { PackageManagers } from "~/components";
66

7-
<Tabs> <TabItem label="npm">
8-
9-
```sh
10-
npm create cloudflare@latest
11-
```
12-
13-
</TabItem>
14-
15-
<TabItem label="yarn">
16-
17-
```sh
18-
yarn create cloudflare@latest
19-
```
20-
21-
</TabItem> </Tabs>
7+
<PackageManagers type="create" pkg="cloudflare@latest" />

src/content/partials/workers/dash-creation-next-steps.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ npm create cloudflare@latest [<DIRECTORY>] -- --type=pre-existing
4040
</TabItem> <TabItem label="yarn">
4141

4242
```sh
43-
yarn create cloudflare@latest [<DIRECTORY>] --type=pre-existing
43+
yarn create cloudflare [<DIRECTORY>] --type=pre-existing
4444
```
4545

4646
</TabItem> <TabItem label="pnpm">

0 commit comments

Comments
 (0)