From 17431f02f95610bec0cb4af82613b5639be8b66e Mon Sep 17 00:00:00 2001 From: John <5445550+johnfg2610@users.noreply.github.com> Date: Fri, 7 Aug 2020 20:04:23 +0100 Subject: [PATCH 1/2] Separated npm install and yarn add Seperated npm install and yarn add to make the copy button useful --- docusaurus/docs/adding-typescript.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docusaurus/docs/adding-typescript.md b/docusaurus/docs/adding-typescript.md index 6f4c86c6cc7..aaf4ac8126d 100644 --- a/docusaurus/docs/adding-typescript.md +++ b/docusaurus/docs/adding-typescript.md @@ -13,9 +13,9 @@ To start a new Create React App project with [TypeScript](https://www.typescript ```sh npx create-react-app my-app --template typescript - -# or - +``` +or +``` yarn create react-app my-app --template typescript ``` @@ -27,9 +27,9 @@ To add [TypeScript](https://www.typescriptlang.org/) to an existing Create React ```sh npm install --save typescript @types/node @types/react @types/react-dom @types/jest - -# or - +``` +or +``` yarn add typescript @types/node @types/react @types/react-dom @types/jest ``` From 56fc334e06742645597272b3a1634e740cf72038 Mon Sep 17 00:00:00 2001 From: John <5445550+johnfg2610@users.noreply.github.com> Date: Fri, 7 Aug 2020 20:18:50 +0100 Subject: [PATCH 2/2] Fixed to match the other articles --- docusaurus/docs/adding-typescript.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docusaurus/docs/adding-typescript.md b/docusaurus/docs/adding-typescript.md index aaf4ac8126d..85d5e394468 100644 --- a/docusaurus/docs/adding-typescript.md +++ b/docusaurus/docs/adding-typescript.md @@ -14,7 +14,8 @@ To start a new Create React App project with [TypeScript](https://www.typescript ```sh npx create-react-app my-app --template typescript ``` -or +Alternatively you may use yarn: + ``` yarn create react-app my-app --template typescript ``` @@ -28,7 +29,8 @@ To add [TypeScript](https://www.typescriptlang.org/) to an existing Create React ```sh npm install --save typescript @types/node @types/react @types/react-dom @types/jest ``` -or +Alternatively you may use yarn: + ``` yarn add typescript @types/node @types/react @types/react-dom @types/jest ```