From 8e7657b07a3487646baeeffca304f2ce96b69a9c Mon Sep 17 00:00:00 2001 From: Paulo Fagiani Date: Thu, 23 Dec 2021 13:00:17 -0300 Subject: [PATCH 1/2] Match egghead.io video instructions Without this code, a further command in the tutorial will fail --- docs/tutorial/building-a-theme.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/tutorial/building-a-theme.md b/docs/tutorial/building-a-theme.md index 17497c253b108..93e8d04031a94 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" + } } ``` From 1382d250dfe05641b60ad801f2756cc4c300958a Mon Sep 17 00:00:00 2001 From: Paulo Fagiani Date: Thu, 23 Dec 2021 13:18:16 -0300 Subject: [PATCH 2/2] Add development dependencies --- docs/tutorial/building-a-theme.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/docs/tutorial/building-a-theme.md b/docs/tutorial/building-a-theme.md index 93e8d04031a94..32733dea4fa2a 100644 --- a/docs/tutorial/building-a-theme.md +++ b/docs/tutorial/building-a-theme.md @@ -134,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 @@ -142,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 @@ -150,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" } } ```