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

feat(Gatsby Recipes): Initial release #22709

Merged
merged 132 commits into from
Apr 16, 2020
Merged
Show file tree
Hide file tree
Changes from 64 commits
Commits
Show all changes
132 commits
Select commit Hold shift + click to select a range
64cc1de
Initial commit
KyleAMathews Apr 1, 2020
b0698d9
Cleanups
KyleAMathews Apr 1, 2020
36b5421
more cleanup
KyleAMathews Apr 1, 2020
461c7ee
Add missing remark-stringify dep (#22721)
johno Apr 1, 2020
50f4e0a
WIP
KyleAMathews Apr 1, 2020
716600c
WIP
KyleAMathews Apr 1, 2020
1fc328e
update TODOs
KyleAMathews Apr 1, 2020
27ac5e2
Prettier + enable Ink's experimental mode
KyleAMathews Apr 1, 2020
92b7c04
Don't need this anymore
KyleAMathews Apr 1, 2020
353ae8f
Support running local recipes e.g. gatsby recipes ./text.mdx
KyleAMathews Apr 1, 2020
3d49140
prettier again
KyleAMathews Apr 1, 2020
faa261f
Make config slightly more robust (#22743)
johno Apr 1, 2020
904e47d
Add support for devDependencies in NPMPackage resource
KyleAMathews Apr 2, 2020
cfdb1d2
Move package to new prop name
KyleAMathews Apr 2, 2020
c0e7b83
Update todos
KyleAMathews Apr 2, 2020
f044af7
add TODO
KyleAMathews Apr 2, 2020
66ff708
recipes: Improve providers (#22764)
johno Apr 2, 2020
d3d8a7b
Improve recipes providers (#22783)
KyleAMathews Apr 3, 2020
1be1b24
Support rendering more markdown
KyleAMathews Apr 3, 2020
f00c6a3
Support more markdown tags
KyleAMathews Apr 3, 2020
140190e
Tweak providers, add more thorough tests
johno Apr 3, 2020
9df2182
Clean up file after plan test
johno Apr 3, 2020
a5db934
recipes: Add initial package json resource (#22805)
johno Apr 3, 2020
14b9548
Copy recipes on change
KyleAMathews Apr 3, 2020
98054b4
improve stylings for h2/h3
KyleAMathews Apr 3, 2020
0f1c3f3
Refactor to use xstate
KyleAMathews Apr 4, 2020
587c0ab
Update TODOs
KyleAMathews Apr 4, 2020
23d483e
Improve parsing to handle basic template strings
johno Apr 4, 2020
905b7da
Improve parsing to handle basic template strings
johno Apr 4, 2020
1231d94
Chore(Recipes): Add recipes machine tests (#22823)
KyleAMathews Apr 4, 2020
2b33c6a
feat(recipes): Add resource schema/validation support (#22830)
KyleAMathews Apr 6, 2020
4f60b91
fix(recipes): Don't duplicate plugin configuration by default (#22861)
johno Apr 6, 2020
310abd2
feat(recipes): Generate graphql schema from resources (#22864)
johno Apr 6, 2020
e22d67e
feat(recipes): Create connection types for resources (#22876)
johno Apr 6, 2020
7f7ac96
Find the root directory of the Node.js project/npm package and use th…
KyleAMathews Apr 6, 2020
bb7a4c9
Fix
KyleAMathews Apr 7, 2020
07860d6
update tests
KyleAMathews Apr 7, 2020
c88c6a5
Write e2e tests for npm package scripts & add validate/all implementa…
KyleAMathews Apr 7, 2020
fca6807
Fix recipes (#22885)
mxstbr Apr 7, 2020
fb46a1e
Fix some more recipes (#22889)
mxstbr Apr 7, 2020
c8d103e
Fix more recipes stuff (#22891)
mxstbr Apr 7, 2020
04ac784
Fix typo
KyleAMathews Apr 7, 2020
6d390c5
feat(recipes): Implement shadowable files for themes (#22909)
johno Apr 7, 2020
a08e767
feat(recipes): iterate on recipe design (#22911)
KyleAMathews Apr 8, 2020
6b67046
Squashed master
KyleAMathews Apr 8, 2020
3b3f926
add todo
KyleAMathews Apr 8, 2020
b11808b
feat(recipes): Show recap of operations & show diff for changes to fi…
KyleAMathews Apr 9, 2020
eaa0535
Merge remote-tracking branch 'origin/master' into add-recipes
KyleAMathews Apr 9, 2020
f1d245b
Fix merge barf
KyleAMathews Apr 9, 2020
bbfa77f
Remove file that came in from bad merge
KyleAMathews Apr 9, 2020
c6de714
update todos
KyleAMathews Apr 9, 2020
bc369a0
Validate resources & improve file diffing (#22986)
KyleAMathews Apr 10, 2020
63604f3
Improve diffing & just run all resource operations serially
KyleAMathews Apr 10, 2020
64625e4
feat(recipes): Import recipes from urls and begin moving parsing to t…
johno Apr 10, 2020
2d191c4
update todos
KyleAMathews Apr 10, 2020
0be2a5d
Add support for file content on remote URLs
KyleAMathews Apr 10, 2020
793c3de
Add some basic docs & new emotion recipe
KyleAMathews Apr 10, 2020
de5e40c
Small updates to README
KyleAMathews Apr 10, 2020
0d0367d
small fixes
KyleAMathews Apr 10, 2020
c36ecee
fix
KyleAMathews Apr 10, 2020
ae665f0
More todos
KyleAMathews Apr 10, 2020
f4d5b2a
Cleanup comments
KyleAMathews Apr 10, 2020
7a0f08b
Add to docs about how to upgrade gatsby-cli
KyleAMathews Apr 10, 2020
22912c3
feat(recipes): Implement basic gitignore provider (#23003)
johno Apr 10, 2020
9a4695d
Move to jest-diff for faster diffing & more control
KyleAMathews Apr 10, 2020
19ad1d0
Update snapshots & use default jest-diff export as that handles any t…
KyleAMathews Apr 10, 2020
0401a13
Chalk thinks it shouldn't output color in a child process — fix that
KyleAMathews Apr 11, 2020
9a71723
tweak TODOs
KyleAMathews Apr 11, 2020
cf8603c
update todos
KyleAMathews Apr 12, 2020
abad6f3
update todos
KyleAMathews Apr 12, 2020
44aee1a
Move mdx source for recipes to their own directory
KyleAMathews Apr 13, 2020
5efb22f
Add Sass recipe
Apr 13, 2020
4f2e2df
Add recipe for setting up local gatsby-theme-blog
Apr 13, 2020
2a2802b
Add todo around bundling
KyleAMathews Apr 13, 2020
6add891
feat(recipes): Eliminate new lines from markdown (#23064)
KyleAMathews Apr 13, 2020
a47d188
feat(recipes): Implement shadow file resource and test it (#23063)
johno Apr 13, 2020
4823995
update todos
KyleAMathews Apr 13, 2020
f3a6f66
Update README.md
shannonbux Apr 13, 2020
eb2acd7
feat(recipes): detect if port is used and use a different one (#23076)
KyleAMathews Apr 13, 2020
e5c9a3d
feat(recipes): Tell people recipes is experimental & point them to th…
KyleAMathews Apr 13, 2020
3fd10b4
Update todo
KyleAMathews Apr 13, 2020
4d80e58
feat(recipes): Use the package manager client the user specifies in t…
KyleAMathews Apr 13, 2020
32edae3
feat(recipes): Improve error handling and validation for MDX files an…
johno Apr 13, 2020
c0d111c
chore(recipes): test File resouces with remote file content (#23084)
KyleAMathews Apr 13, 2020
40b0cdc
update todos
KyleAMathews Apr 13, 2020
2ef02d1
Update todos
johno Apr 14, 2020
27376b0
feat(Recipes): Show list of recipes when one isn't passed in (#23086)
KyleAMathews Apr 14, 2020
0e482a2
update todos & add layout recipe to list"
KyleAMathews Apr 14, 2020
69bac1b
feat(recipes): Move recipes to a standalone package (#23108)
johno Apr 14, 2020
a2c264c
Prettier color
KyleAMathews Apr 14, 2020
9acdd11
feat(recipes): Format gatsby-config changes with Prettier (#23112)
KyleAMathews Apr 14, 2020
2225382
Merge branch 'add-recipes' of github.com:gatsbyjs/gatsby into add-rec…
KyleAMathews Apr 14, 2020
197f639
Bigger changes (#23078)
shannonbux Apr 14, 2020
74350b0
feat(recipes): Add more recipes (#23119)
KyleAMathews Apr 14, 2020
0ca5abb
Fix name of <GatsbyShadowFile> and document it
KyleAMathews Apr 14, 2020
feddd5a
feat(recipes): Bundle react libraries into the cli (#23122)
johno Apr 15, 2020
ca5876f
Format
KyleAMathews Apr 15, 2020
4b2d5f5
Fix linting errors
KyleAMathews Apr 15, 2020
d725570
Fix more linting
KyleAMathews Apr 15, 2020
ae658e8
update snapshots
KyleAMathews Apr 15, 2020
ba56623
Squashed commit of the following:
KyleAMathews Apr 15, 2020
b52fc38
update yarn.lock
KyleAMathews Apr 15, 2020
f583af8
Merge branch 'master' into add-recipes
KyleAMathews Apr 15, 2020
b33d513
update eslint recipe
KyleAMathews Apr 15, 2020
d9eb403
fix tests
KyleAMathews Apr 15, 2020
1834ecd
Fix telemetry data
KyleAMathews Apr 15, 2020
8064fb4
chore(recipes): Move recipes code to gatsby-recipes-core (#23138)
KyleAMathews Apr 15, 2020
d7bf2b5
Add codeowners to gatsby-recipes (#23146)
johno Apr 15, 2020
ce0c719
Use dist
KyleAMathews Apr 15, 2020
348d326
chore(recipes): fix stuff (#23154)
KyleAMathews Apr 15, 2020
189abc5
fix(recipes): Update tests and fix babel config, tweak readme (#23152)
johno Apr 15, 2020
3ac2358
Merge branch 'add-recipes' of github.com:gatsbyjs/gatsby into add-rec…
KyleAMathews Apr 15, 2020
71daa66
Make the dependency type 'development' as less repetative
KyleAMathews Apr 15, 2020
3dcc4ab
update docs for release
KyleAMathews Apr 15, 2020
6a41c60
Run prettier
KyleAMathews Apr 16, 2020
64d3651
Fix lint errors
KyleAMathews Apr 16, 2020
3dd8f6c
Update
KyleAMathews Apr 16, 2020
e856272
Have gatsby depend on recipes tag
KyleAMathews Apr 16, 2020
33ee7cf
Fix site build
KyleAMathews Apr 16, 2020
c035e6c
Add note to theme-ui recipe that people need to remove any background…
KyleAMathews Apr 16, 2020
71049cd
Fix remaining package.json inconsistency
johno Apr 16, 2020
1db306b
Remove another failing giphy
KyleAMathews Apr 16, 2020
474ce42
Fix typo in package update
johno Apr 16, 2020
bc6f0e7
Fixing building .org
KyleAMathews Apr 16, 2020
f83132b
fix another
KyleAMathews Apr 16, 2020
9bbf3f4
Remove 404ed starter
KyleAMathews Apr 16, 2020
37bf95e
chore(recipes): Move recipes readme to gatsby-recipes root, add examp…
johno Apr 16, 2020
82ee210
fix(recipes): Don't write out debug log unless env var is set (#23169)
johno Apr 16, 2020
503be2c
fix(recipes): Handle errors during package installs (#23175)
johno Apr 16, 2020
b4da4dc
use what will be stable release version of gatsby-recipes to make ler…
KyleAMathews Apr 16, 2020
8194479
Add raw arguments to the IProgram type
KyleAMathews Apr 16, 2020
9724da4
fix linting error
KyleAMathews Apr 16, 2020
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
13 changes: 13 additions & 0 deletions packages/gatsby-cli/src/create-cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,19 @@ function buildLocalCommands(cli, isLocalSite) {
return cmd(args)
}),
})
cli.command({
command: `recipes`,
desc: `Run a recipe`,
handler: handlerP(
getCommandHandler(`recipes`, (args, cmd) => {
cmd(args)
// Return an empty promise to prevent handlerP from exiting early.
// The development server shouldn't ever exit until the user directly
// kills it so this is fine.
return new Promise(resolve => {})
})
),
})
}

function isLocalGatsbySite() {
Expand Down
42 changes: 40 additions & 2 deletions packages/gatsby/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,22 @@
"@babel/parser": "^7.8.8",
"@babel/polyfill": "^7.8.7",
"@babel/runtime": "^7.8.7",
"@babel/standalone": "^7.9.5",
johno marked this conversation as resolved.
Show resolved Hide resolved
"@babel/traverse": "^7.8.6",
"@hapi/joi": "^15.1.1",
"@mdx-js/mdx": "^1.5.8",
"@mdx-js/react": "^1.5.8",
"@mdx-js/runtime": "^1.5.8",
"@mikaelkristiansson/domready": "^1.0.10",
"@pieh/friendly-errors-webpack-plugin": "1.7.0-chalk-2",
"@pmmmwh/react-refresh-webpack-plugin": "^0.2.0",
"@reach/router": "^1.3.3",
"@typescript-eslint/eslint-plugin": "^2.24.0",
"@typescript-eslint/parser": "^2.24.0",
"@xstate/graph": "^1.0.0",
"@xstate/test": "^0.3.0",
"acorn": "^7.1.1",
"acorn-jsx": "^5.2.0",
"address": "1.1.2",
"autoprefixer": "^9.7.4",
"axios": "^0.19.2",
Expand Down Expand Up @@ -64,6 +72,7 @@
"eslint-plugin-react": "^7.19.0",
"eslint-plugin-react-hooks": "^1.7.0",
"event-source-polyfill": "^1.0.12",
"execa": "^4.0.0",
"express": "^4.17.1",
"express-graphql": "^0.9.0",
"fast-levenshtein": "^2.0.6",
Expand All @@ -78,17 +87,29 @@
"gatsby-plugin-page-creator": "^2.2.1",
"gatsby-react-router-scroll": "^2.2.1",
"gatsby-telemetry": "^1.2.3",
"git-diff": "^2.0.6",
"glob": "^7.1.6",
"got": "8.3.2",
"graphql": "^14.6.0",
"graphql-compose": "^6.3.8",
"graphql-playground-middleware-express": "^1.7.12",
"graphql-subscriptions": "^1.1.0",
"graphql-type-json": "^0.3.1",
"hasha": "^5.2.0",
"html-tag-names": "^1.1.5",
"humanize-list": "^1.0.1",
"import-jsx": "^4.0.0",
"ink-link": "^1.0.0",
"invariant": "^2.2.4",
"is-blank": "^2.1.0",
"is-newline": "^1.0.0",
"is-relative": "^1.0.0",
"is-relative-url": "^3.0.0",
"is-string": "^1.0.5",
"is-url": "^1.2.4",
"is-wsl": "^2.1.1",
"jest-worker": "^24.9.0",
"joi2gql": "^1.3.1",
"json-loader": "^0.5.7",
"json-stringify-safe": "^5.0.1",
"latest-version": "5.1.0",
Expand All @@ -110,6 +131,7 @@
"p-defer": "^3.0.0",
"parseurl": "^1.3.3",
"physical-cpu-count": "^2.0.0",
"pkg-dir": "^4.2.0",
"pnp-webpack-plugin": "^1.6.4",
"postcss-flexbugs-fixes": "^4.2.0",
"postcss-loader": "^3.0.0",
Expand All @@ -120,21 +142,31 @@
"react-error-overlay": "^3.0.0",
"react-hot-loader": "^4.12.20",
"react-refresh": "^0.7.0",
"read-package-tree": "^5.3.1",
"redux": "^4.0.5",
"redux-thunk": "^2.3.0",
"remark-stringify": "^8.0.0",
"semver": "^5.7.1",
"shallow-compare": "^1.2.2",
"sift": "^5.1.0",
"signal-exit": "^3.0.2",
"simplified-jsx-to-json": "^0.1.0",
"single-trailing-newline": "^1.0.0",
"slugify": "^1.4.0",
"socket.io": "^2.3.0",
"stack-trace": "^0.0.10",
"string-similarity": "^1.2.2",
"style-loader": "^0.23.1",
"style-to-object": "^0.3.0",
"subscriptions-transport-ws": "^0.9.16",
"svg-tag-names": "^2.0.1",
"terser-webpack-plugin": "^1.4.3",
"true-case-path": "^2.2.1",
"type-of": "^2.0.1",
"unist-util-remove": "^2.0.0",
"unist-util-visit": "^2.0.2",
"url-loader": "^1.1.2",
"urql": "^1.9.5",
"util.promisify": "^1.0.1",
"uuid": "^3.4.0",
"v8-compile-cache": "^1.1.2",
Expand All @@ -144,6 +176,7 @@
"webpack-hot-middleware": "^2.25.0",
"webpack-merge": "^4.2.2",
"webpack-stats-plugin": "^0.3.1",
"ws": "^7.2.3",
"xstate": "^4.8.0",
"yaml-loader": "^0.5.0"
},
Expand All @@ -153,6 +186,7 @@
"@types/hapi__joi": "^16.0.12",
"@types/socket.io": "^2.1.4",
"babel-preset-gatsby-package": "^0.3.1",
"copy-and-watch": "^0.1.4",
"cross-env": "^5.2.1",
"documentation": "^12.1.4",
"eslint-plugin-jsx-a11y": "^6.2.3",
Expand Down Expand Up @@ -202,17 +236,21 @@
"graphql": "^14.6.0"
},
"scripts": {
"build": "npm run build:src && npm run build:internal-plugins && npm run build:rawfiles && npm run build:cjs",
"build": "npm run build:src && npm run build:internal-plugins && npm run build:rawfiles && npm run build:cjs && npm run build:recipes",
johno marked this conversation as resolved.
Show resolved Hide resolved
"postbuild": "node scripts/output-api-file.js",
"build:internal-plugins": "copyfiles -u 1 src/internal-plugins/**/package.json dist",
"build:rawfiles": "copyfiles -u 1 src/internal-plugins/**/raw_* dist",
"build:recipes": "copyfiles -u 1 src/recipes/*.mdx dist",
"watch:recipes": "copy-and-watch src/recipes/*.mdx dist/recipes",
"build:cjs": "babel cache-dir --out-dir cache-dir/commonjs --ignore **/__tests__",
"build:src": "babel src --out-dir dist --source-maps --verbose --ignore **/gatsby-cli.js,src/internal-plugins/dev-404-page/raw_dev-404-page.js,**/__tests__ --extensions \".ts,.js\"",
"clean-test-bundles": "find test/ -type f -name bundle.js* -exec rm -rf {} +",
"prebuild": "rimraf dist && rimraf cache-dir/commonjs",
"postinstall": "node scripts/postinstall.js",
"prepare": "cross-env NODE_ENV=production npm run build",
"watch": "rimraf dist && mkdir dist && npm run build:internal-plugins && npm run build:rawfiles && npm run build:src -- --watch"
"watch": "rimraf dist && mkdir dist && npm run build:internal-plugins && npm run build:rawfiles && npm run build:src -- --watch",
"test": "jest",
"test:watch": "jest --watch"
},
"types": "index.d.ts",
"yargs": {
Expand Down
45 changes: 45 additions & 0 deletions packages/gatsby/src/commands/recipes.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import telemetry from "gatsby-telemetry"
import execa from "execa"
import path from "path"
import fs from "fs"

module.exports = async (program: IProgram): Promise<void> => {
const recipe = program._[1]
telemetry.trackCli(`RECIPE_RUN`, { recipe })
KyleAMathews marked this conversation as resolved.
Show resolved Hide resolved

// Start GraphQL serve
let subprocess
const scriptPath = path.join(
johno marked this conversation as resolved.
Show resolved Hide resolved
program.directory,
`node_modules/gatsby/dist/recipes/graphql.js`
)
subprocess = execa(`node`, [scriptPath], {
cwd: program.directory,
all: true,
})
subprocess.stderr.on("data", data => {
console.log(data.toString())
})
process.on("exit", () =>
subprocess.kill("SIGTERM", {
forceKillAfterTimeout: 2000,
})
)
// Log server output to a file.
if (process.env.DEBUG) {
const logFile = path.join(program.directory, "./recipe-server.log")
fs.writeFileSync(logFile, `\n-----\n${new Date().toJSON()}\n`)
const writeStream = fs.createWriteStream(logFile, { flags: "a" })
subprocess.stdout.pipe(writeStream)
}

let started = false
subprocess.stdout.on("data", data => {
if (!started) {
const runRecipe = require(`../recipes/index`)
runRecipe({ recipe, projectRoot: program.directory })
started = true
}
})
// Run command
}
137 changes: 137 additions & 0 deletions packages/gatsby/src/recipes/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
# Gatsby Recipes

Gatsby Recipes is framework for automating common Gatsby tasks. Recipes are MDX
files which when run by our interpretor, perform common actions like installing
NPM packages, installing plugins, creating pages, etc.

It's designed to be extensible so new capabilities can be added which allow
Recipes to automate more things.

We chose MDX to allow for a literate programming style of writing recipes which
enables us to port our dozens of recipes from
https://www.gatsbyjs.org/docs/recipes/ as well as in the future, entire
tutorials.

[Read more about Recipes on the RFC](https://github.com/gatsbyjs/gatsby/pull/22610)

There's an umbrella issue for testing / using Recipes during its incubation stage.

Follow the issue for updates!

https://github.com/gatsbyjs/gatsby/issues/22991

## How to write a recipe

Let's write our first Recipe to setup Emotion on a Gatsby site.

```mdx
# Setup Gatsby with Emotion

[Emotion](https://emotion.sh/) is a powerful CSS-in-JS library that supports both inline CSS styles and styled components. You can use each styling feature individually or together in the same file.

---

Install necessary NPM packages

<NPMPackage name="gatsby-plugin-emotion" />
<NPMPackage name="@emotion/core" />
<NPMPackage name="@emotion/styled" />

---

Install the Emotion plugin in gatsby-config.js

<GatsbyPlugin name="gatsby-plugin-emotion" />

---

Sweet, now it's ready to go.

Let's also write out an example page you can use to play
with Emotion.

<File
path="src/pages/emotion-example.js"
content="https://gist.githubusercontent.com/KyleAMathews/323bacd551df46e8e7b6146cbf827d0b/raw/5c60f168f30c505cff1ff2433e69dabe27ae9738/sample-emotion.js"
/>

---

Read more about Emotion on the official Emotion docs site:

https://emotion.sh/docs/introduction
```

Let's try running out this Recipe!

First create a new Hello World Gatsby site:

`gatsby new try-emotion https://github.com/gatsbyjs/gatsby-starter-hello-world`
KyleAMathews marked this conversation as resolved.
Show resolved Hide resolved

Meanwhile also upgrade the global gatsby-cli package to use the one with new recipes command.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we put this first? Separate out the instructions that allow for recipes from what we're adding to the example.


`npm install -g gatsby-cli@recipes`

Once the global finishes installing, running `gatsby -v` should show this as your version: `Gatsby CLI version: 2.11.4-recipes.53`

Upgrade the version of Gatsby installed to use one with Recipes.

`yarn add gatsby@recipes`

Now run the Emotion recipe and follow the commands.

`gatsby recipes emotion`
KyleAMathews marked this conversation as resolved.
Show resolved Hide resolved

## Ways to run Recipes
johno marked this conversation as resolved.
Show resolved Hide resolved

You can run built-in Recipes, ones you write locally, and ones people have posted online.

To run a local recipe, make sure to start the path to the recipe with a period like `gatsby recipes ./my-cool-recipe.mdx`

To run a remote recipe, just paste in the path to the recipe e.g. `gatsby recipes https://example.com/sweet-recipe.mdx`

## How to write your own

### API

#### `<GatsbyPlugin>`

Installs a Gatsby Plugin in the site's `gatsby-config.js`.

Soon will support options.

```jsx
<GatsbyPlugin name="gatsby-plugin-emotion" />
```

##### props

- **name** name of the plugin

#### `<NPMPackage`

`<NPMPackage name="lodash" version="latest" />`

##### props

- **name**: name of the package(s) to install. Takes a string or an array of strings.
- **version**: defaults to latest
- **dependencyType**: defaults to `dependency`. Other options include `devDependency`

#### `<NPMScript>`

`<NPMScript name="test" command="jest" />`

##### props

- **name:** name of the command
- **command** the command that's run when the script is called

#### `<File>`
johno marked this conversation as resolved.
Show resolved Hide resolved

<File path="test.md" content="https://raw.githubusercontent.com/KyleAMathews/test-recipes/master/gatsby-receipe-sass.mdx" />

##### props

- **path** path to the file that should be created. The path is local to the root of the Node.js project (where the package.json is)
- **content** URL to the content that should be written to the path. Eventually we'll support directly putting content here after some fixees to MDX.
Loading