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

docs: Match egghead.io video instructions #34315

Merged
merged 2 commits into from
Dec 28, 2021
Merged
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
21 changes: 19 additions & 2 deletions docs/tutorial/building-a-theme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
```

Expand Down Expand Up @@ -129,14 +134,20 @@ 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
```

> 💡 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
Expand All @@ -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"
}
}
```
Expand Down