From bd3524e81590abe07d3dda46a6ec46d069fde054 Mon Sep 17 00:00:00 2001 From: Paulo Fagiani Date: Tue, 28 Dec 2021 09:04:33 -0300 Subject: [PATCH] docs: Match egghead.io video instructions (#34315) --- docs/tutorial/building-a-theme.md | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/docs/tutorial/building-a-theme.md b/docs/tutorial/building-a-theme.md index 17497c253b108..32733dea4fa2a 100644 --- a/docs/tutorial/building-a-theme.md +++ b/docs/tutorial/building-a-theme.md @@ -47,7 +47,12 @@ In the `package.json` file in `gatsby-theme-events`, add the following: "name": "gatsby-theme-events", "version": "1.0.0", "main": "index.js", - "license": "MIT" + "license": "MIT", + "scripts": { + "build": "gatsby build", + "develop": "gatsby develop", + "clean": "gatsby clean" + } } ``` @@ -129,7 +134,7 @@ If you run `yarn workspaces info`, you'll be able to verify that the site is usi ### Add peer dependencies to `gatsby-theme-events` -Targeting the `gatsby-theme-events` workspace, install `gatsby`, `react`, and `react-dom` as peer dependencies: +Targeting the `gatsby-theme-events` workspace, install `gatsby`, `react`, and `react-dom` as peer and development dependencies: ```shell yarn workspace gatsby-theme-events add -P gatsby react react-dom @@ -137,6 +142,12 @@ yarn workspace gatsby-theme-events add -P gatsby react react-dom > 💡 The `-P` flag is shorthand for installing peer dependencies. +```shell +yarn workspace gatsby-theme-events add -D gatsby react react-dom +``` + +> 💡 The `-D` flag is shorthand for installing development dependencies. + The `gatsby-theme-events/package.json` file should now include the following: ```json:title=gatsby-theme-events/package.json @@ -145,6 +156,12 @@ The `gatsby-theme-events/package.json` file should now include the following: "gatsby": "^3.0.0", "react": "^17.0.0", "react-dom": "^17.0.0" + }, + { + "devDependencies": { + "gatsby": "^3.0.0", + "react": "^17.0.0", + "react-dom": "^17.0.0" } } ```