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): add recipes gui #24595

Merged
merged 226 commits into from
Aug 3, 2020
Merged
Show file tree
Hide file tree
Changes from 219 commits
Commits
Show all changes
226 commits
Select commit Hold shift + click to select a range
4fdd86b
feat(gatsby-recipes): Pass data retrieved from the resource to its ch…
johno May 26, 2020
b0bb00c
chore(gatsby-recipes): Swap out Promise.all for a true queue
johno May 28, 2020
3863d73
feat(gatsby-recipes): Implement a render loop for nested resources
johno May 28, 2020
c99504d
Continue spiking out recipes gui
johno May 19, 2020
eecaa9a
Hardcode the project root in a clear place for now
johno May 19, 2020
71baa0e
Join plan steps in order to create entire recipe plan at once + initi…
KyleAMathews May 22, 2020
0b2811b
WIP
KyleAMathews May 28, 2020
3a2e097
feat(gatsby-recipes): Implement a wait for input state when props are…
johno May 28, 2020
1fc3d7c
chore(gatsby-recipes): Use an INVALID_PROP event for schema validation
johno May 28, 2020
13b22f1
feat(gatsby-recipes): Wrap intro and each step with components, add m…
johno May 28, 2020
7fc0c21
chore(gatsby-recipes): Spike out basic gui component for steps
johno May 28, 2020
896ef82
feat(gatsby-recipes): Pass data retrieved from the resource to its ch…
johno May 26, 2020
92fa835
chore(gatsby-recipes): Swap out Promise.all for a true queue
johno May 28, 2020
477e863
feat(gatsby-recipes): Implement a render loop for nested resources
johno May 28, 2020
f2c205f
Continue spiking out recipes gui
johno May 19, 2020
10f89b1
Hardcode the project root in a clear place for now
johno May 19, 2020
36a42cb
Join plan steps in order to create entire recipe plan at once + initi…
KyleAMathews May 22, 2020
34a9fa7
WIP
KyleAMathews May 28, 2020
2e325e7
feat(gatsby-recipes): Implement a wait for input state when props are…
johno May 28, 2020
0007298
chore(gatsby-recipes): Use an INVALID_PROP event for schema validation
johno May 28, 2020
7b95efb
feat(gatsby-recipes): Wrap intro and each step with components, add m…
johno May 28, 2020
640caaf
chore(gatsby-recipes): Spike out basic gui component for steps
johno May 28, 2020
5b66257
Lots of styling changes
KyleAMathews May 29, 2020
70ed3bb
Merge commit 'refs/pull/24590/head' of github.com:gatsbyjs/gatsby int…
KyleAMathews May 29, 2020
5e45b39
Put text & resources in same steps
KyleAMathews May 29, 2020
284c058
Lots more styling tweaks
KyleAMathews May 29, 2020
06251f1
paragraphs had too much margin bottom
KyleAMathews May 29, 2020
7a7c7ba
more style tweaks
KyleAMathews May 29, 2020
ab6d294
feat(gatsby-recipes): Implement a wait for input state when props are…
johno May 28, 2020
3239356
chore(gatsby-recipes): Use MDX v2 canary for access to the JSX AST
johno May 29, 2020
b614dc6
feat(gatsby-recipes): Apply a UUID prop to all resources for input ha…
johno May 29, 2020
c39eb7c
checkin: Begin wiring up event for passing input data to server
johno May 29, 2020
aff2513
fix(gatsby-recipes): Update step wrapping for MDX v2
johno May 29, 2020
ecd0ab9
fix(gatsby-recipes): Get tests passing, add debugging output
johno May 29, 2020
0a39e4a
Get applying working
KyleAMathews May 29, 2020
de3ebce
PROGRESSSSS
KyleAMathews May 29, 2020
0b487e3
feat(gatsby-recipes): Allow for inputs based on uuid to override props
johno May 29, 2020
0ce50b6
Remove sleep
KyleAMathews May 29, 2020
6d36395
style tweaks
KyleAMathews May 30, 2020
7c5f9ce
Add updater to input provider, spike out File form
johno May 29, 2020
439b8bc
feat(gatsby-recipes): Implement basic input functionality
johno May 30, 2020
16880e0
feat(gatsby-recipes): Spike out a contentful space resource, use rend…
johno May 30, 2020
69ce2e9
feat(gatsby-recipes): Spike out contentful provider and basic renderi…
johno May 30, 2020
0edc847
WIP
KyleAMathews May 30, 2020
1877fc8
More design tweaks
KyleAMathews Jun 5, 2020
cd99cd8
Style inline code
KyleAMathews Jun 5, 2020
f1c572b
Update packages/gatsby-recipes/recipes/cypress.mdx
KyleAMathews Jun 10, 2020
a04a8a5
Update packages/gatsby-recipes/recipes/cypress.mdx
KyleAMathews Jun 10, 2020
17ca010
Update packages/gatsby-recipes/recipes/cypress.mdx
KyleAMathews Jun 10, 2020
6ede2fa
feat(gatsby-recipes): fix MDX rendering for exports (#25133)
KyleAMathews Jun 19, 2020
cb11c32
live updating is working more-or-less
KyleAMathews Jun 20, 2020
624bc69
Speedups & cleanups
KyleAMathews Jun 20, 2020
498212c
Rename hook to match signature
KyleAMathews Jun 20, 2020
f950f1a
Rename context
KyleAMathews Jun 20, 2020
0eedd67
Add support for useResourceByKey
KyleAMathews Jun 20, 2020
def3174
fix @babel/template not accepting integers as options
KyleAMathews Jun 21, 2020
bf93d69
Only update resources when it's changed
KyleAMathews Jun 21, 2020
14ab0cc
make child Resource components work
KyleAMathews Jun 21, 2020
a404aac
rename useResourceByKey -> useResource
KyleAMathews Jun 22, 2020
8d1a143
Implement ContentfulEntry resource
KyleAMathews Jun 22, 2020
d2d9220
Add useProvider & ensure only apply resource once
KyleAMathews Jun 23, 2020
44f318d
Address some design feedback
johno Jul 13, 2020
ca94b27
Fix spacing for input forms
johno Jul 13, 2020
ff84edb
Fix spacing and size of step indicator
johno Jul 13, 2020
0ff2530
Flatten nested resources in display
johno Jul 13, 2020
3ba88ff
Use input builtins from gatsby-interface
johno Jul 13, 2020
9f84fc9
Add special file diff
johno Jul 16, 2020
c494f06
Merge branch 'inputs-support' into recipes-gui-admin
KyleAMathews Jul 16, 2020
e425064
Get things running again
KyleAMathews Jul 16, 2020
d05e3bc
Reload recipe session on changes
KyleAMathews Jul 17, 2020
797b1b0
Update tests
KyleAMathews Jul 17, 2020
6c25ece
Only emit updates when the state has actually changed
KyleAMathews Jul 17, 2020
67ee864
Fix building recipe component
KyleAMathews Jul 20, 2020
a238337
merge master
KyleAMathews Jul 20, 2020
842a451
update resolutions/dependencies
KyleAMathews Jul 20, 2020
fba886d
fix fetch dependency
KyleAMathews Jul 20, 2020
98c0690
moer fixes
KyleAMathews Jul 20, 2020
d4ecc94
Upgrade to Ink v3 & start migrating cli to showing all steps
KyleAMathews Jul 21, 2020
22ed01d
Properly handle nested resources when rendering the plan (#25930)
johno Jul 21, 2020
2c257af
feat(gatsby-recipes): Refactor CLI UI for new one-shot show plan (#25…
KyleAMathews Jul 23, 2020
c3cc70d
move back to v2 for deploying for compatability with the regular CLI
KyleAMathews Jul 24, 2020
78a3409
Also do a compatability layer for <Box>
KyleAMathews Jul 24, 2020
8bf1675
test
KyleAMathews Jul 24, 2020
9e77c66
Add missing dependency
KyleAMathews Jul 24, 2020
a23931d
sad
KyleAMathews Jul 24, 2020
38a30ec
Add rollup to bundle the cli app so we can use Ink v3
KyleAMathews Jul 24, 2020
619cdf6
Move packages packed by rollup to be dev dependencies as user won't n…
KyleAMathews Jul 24, 2020
2b201e1
Remove console.logs
KyleAMathews Jul 24, 2020
e8fd60d
Remove logs
KyleAMathews Jul 24, 2020
56d587e
feat(gatsby-recipes): copy edits for some recipes (#26009)
shannonbux Jul 25, 2020
9d078a5
Merge branch 'recipes-gui-admin' of github.com:gatsbyjs/gatsby into r…
KyleAMathews Jul 25, 2020
93b00e2
Fix rendering li > p
KyleAMathews Jul 28, 2020
28d54c5
Fix formatting of emotion recipe
KyleAMathews Jul 28, 2020
c15ff1b
Improve recipe
KyleAMathews Jul 28, 2020
3a8c3ff
Name of key changed
KyleAMathews Jul 28, 2020
0dbdda5
Match keyed resources correctly in the install step + cleanups
KyleAMathews Jul 28, 2020
aefd541
Fix linting errors
KyleAMathews Jul 28, 2020
124aa9a
fix margin
KyleAMathews Jul 28, 2020
5c3b082
Surround inlineCode with back ticks so it looks like markdown
KyleAMathews Jul 28, 2020
0e0918f
vendor ink-link as it's not upgraded to v3 yet
KyleAMathews Jul 28, 2020
f0673fc
feat(gatsby-recipes) (#26085)
shannonbux Jul 28, 2020
86f33f1
Merge branch 'recipes-gui-admin' of github.com:gatsbyjs/gatsby into r…
KyleAMathews Jul 28, 2020
c48c75b
prettier file
KyleAMathews Jul 29, 2020
b7fa32d
Fix linting errors
KyleAMathews Jul 29, 2020
af4a208
feat(gatsby-recipes): fix recipes copy 2 (#26115)
shannonbux Jul 29, 2020
b4da0c8
feat(gatsby-source-shopify): Add shopifyShop query (#25763)
PaulieScanlon Jul 20, 2020
72be86f
Start moving gatsby-telemetry to typescript (#25812)
jamo Jul 20, 2020
9da7624
Add Changelog entry for merged PR #24306
blainekasten Jul 20, 2020
93edf7e
chore(gatsby-telemetry): Migrate is-truthy to TypeScript (#25884)
blainekasten Jul 20, 2020
0adde08
Detect vercel again after rebranding in gatsby-telemetry (#25883)
jamo Jul 20, 2020
b077f99
chore(gatsby-telemetry): Migrate flush to TypeScript (#25886)
blainekasten Jul 20, 2020
5876391
feat(gatsby-source-shopify): set link from product variant to product…
jzabala Jul 20, 2020
50b78a4
fix: update www (#25874)
renovate[bot] Jul 20, 2020
3a88f91
docs(gatsby-internals): update page -> node dependency tracking (#25606)
pieh Jul 21, 2020
d780128
remove surplus `and` from performance comma list (#25891)
mikeymurph77 Jul 21, 2020
2d58747
fixed typo (#25896)
dawood6 Jul 21, 2020
c7bad74
fix(gatsby): Support symlinks in static directories (#25894)
jabrks Jul 21, 2020
b2175ce
Added the link to 'MDX' (#25905)
Jul 21, 2020
45a35f9
Update localization-i18n.md (#25902)
kaknut Jul 21, 2020
4056fb1
added a cookieflags option (#25907)
thijsvandiessen Jul 21, 2020
52cc9f1
fix(readme): gatsby-source-shopify: unify variable names (#25882)
muescha Jul 21, 2020
13ed8bd
chore(showcase): Add MongoDB Developer Hub (#25892)
jestapinski Jul 21, 2020
16e62ae
Add file names to code blocks (#25879)
muescha Jul 21, 2020
c944469
enhancement(docs): dictionary.txt -> CodePen -> fix brand name (#25875)
muescha Jul 21, 2020
85b7058
feat(gatsby-admin): list all pages of site (#25744)
mxstbr Jul 21, 2020
a5a206f
feat(gatsby-admin): plugin search (#25903)
mxstbr Jul 21, 2020
fc0086c
fix: Restore CLI port in use prompt feature (#25863)
polarathene Jul 21, 2020
a723b76
Fix/follow up 25863 (#25915)
blainekasten Jul 21, 2020
423310b
chore(release): Publish
blainekasten Jul 21, 2020
6f1128b
Capture repositoryId from heroku (#25910)
jamo Jul 21, 2020
924c3f1
fixed typo (#25912)
dawood6 Jul 21, 2020
6fea976
Update README.md (#25901)
kaknut Jul 21, 2020
e50c793
Add __BASE_PATH__ definition to storybook config (#25643)
nabeelvalley Jul 21, 2020
0e73ec5
fix(gatsby): don't place virtual modules in node_modules directory (#…
pieh Jul 21, 2020
aeba824
chore(doc):Add guide to Deploy Gatsby to DigitalOcean droplet. (#24652)
mistryvatsal Jul 21, 2020
84d0dad
Update migrating-from-v1-to-v2.md (#25832)
r1 Jul 21, 2020
d482be3
fix dictionary for digitalocean guide (#25936)
Jul 21, 2020
d3ef12d
fix(docs): show where `getNodesByType` comes from (#25344)
kurttomlinson Jul 22, 2020
600e53e
chore(docs): Changes to "Setting Up Your Local Dev Environment" doc (…
LekoArts Jul 22, 2020
346c1ab
chore(gatsby): add log to gatsby develop if Admin is enabled (#25943)
mxstbr Jul 22, 2020
a571efa
feat(gatsby): Defer node mutation during querying (#25479)
ascorbic Jul 22, 2020
a62fffd
chore(release): Publish
ascorbic Jul 22, 2020
8ac84a6
fix(docs): Fix broken mdx (#25946)
ascorbic Jul 22, 2020
a010c34
chore(gatsby-admin): build in postbuild of gatsby instead of prepubli…
mxstbr Jul 22, 2020
2703561
perf(gatsby-source-contentful): speed up resolving of huge spaces (#2…
axe312ger Jul 22, 2020
3b033fe
docs: use hello-world starter in quick start guide instead of default…
jsumnersmith Jul 23, 2020
8121b03
chore(docs): Fix RFC typo (#25970)
LekoArts Jul 23, 2020
5fe94e1
chore(gatsby-admin): cleanup stale artifacts pre build (#25972)
mxstbr Jul 23, 2020
ad2544d
Handle webpack in state machine (#25815)
ascorbic Jul 23, 2020
f844b99
chore(release): Publish
ascorbic Jul 23, 2020
d964d96
fix(gatsby-admin): show error messages in the interface (#25944)
mxstbr Jul 23, 2020
34d0ac4
docs(gatsby-admin): more detailed architecture explanation (#25941)
mxstbr Jul 23, 2020
c414566
fix(gatsby): call predicate for the root ancestor in findRootNodeAnce…
vladar Jul 23, 2020
35c6ba5
fix(gatsby-admin): small design tweaks (#25971)
mxstbr Jul 23, 2020
979667e
feat(gatsby): Add internal types export (#25921)
ascorbic Jul 23, 2020
9015b01
feat(plugin-manifest): support SVG favicon (#25276)
moonmeister Jul 23, 2020
9e02199
maintenance(www) remove unused dependencies (#25463)
tesseralis Jul 23, 2020
f454acd
Update contributor-swag.md (#25980)
Laci-Texter Jul 23, 2020
a4fd928
feat(gatsby-source-filesystem): improve wrong url rejection message (…
TylerBarnes Jul 23, 2020
ba823bb
Also detect VERCEL_BUILDER should Vercel one day use it as per the do…
jamo Jul 24, 2020
784577f
fix(babel-preset-gatsby): enable transformer-regenerator (#25983)
wardpeet Jul 24, 2020
6262a62
fix(docs): bash to shell (#25958)
muescha Jul 24, 2020
e44e835
chore: add tests to static-query filepaths (#25978)
wardpeet Jul 24, 2020
1e29d1c
chore(release): Publish
wardpeet Jul 24, 2020
401270e
highlighted plugins (#25998)
Jul 24, 2020
6071c6b
Revert "perf(gatsby-plugin-mdx): drop another babel step during sourc…
Jul 24, 2020
2f7aafd
fix: Enable CLI integration tests (#25997)
ascorbic Jul 24, 2020
4ccde93
[docs][glossary] add new entry for client-side rendering (#25984)
Jul 24, 2020
8b27d7d
fix: do not augment plugin-options (#26006)
wardpeet Jul 24, 2020
283d670
fix(gatsby-recipes) Fix docs for name in NPMPackage
KyleAMathews Jul 26, 2020
af5d664
fix: update www (#26043)
renovate[bot] Jul 27, 2020
1d53f3b
Added extra markup (#26030)
Jul 27, 2020
a0a7a4d
chore(showcase): Add leanier.com site (#26016)
anubhavmeet Jul 27, 2020
1a20b7d
Add support for cache refresh via GraphiQL (#25960)
herecydev Jul 27, 2020
d5a9d02
www: Remove sw (#26054)
sidharthachatterjee Jul 27, 2020
3232021
Docs: Add a warning about static queries (#25929)
herecydev Jul 28, 2020
4de5e83
feat(gatsby): Add top-level error handling to state machine (#25995)
ascorbic Jul 28, 2020
7e0640c
chore: Update stale yarn.lock (#26068)
ascorbic Jul 28, 2020
8c9423a
tests(gatsby): Add unit tests for develop state machine (#26051)
ascorbic Jul 28, 2020
c310981
chore(showcase): Add johnkavanagh.co.uk (#25747)
johnkavanagh Jul 28, 2020
b3b19eb
chore(showcase): Minor changes Showcase Tatjana Volbeke Portfolio (#2…
jlsvaicius Jul 28, 2020
6677766
fix(gatsby): Defer node mutation in more APIs (#26067)
ascorbic Jul 28, 2020
a6dac1d
chore(release): Publish
ascorbic Jul 28, 2020
cec809f
chore(showcase): add Julien Karst website (#25682)
JulienKode Jul 28, 2020
51170c5
chore(showcase): BRIKL & TRUE STORY in showcase (#25631)
MeixnerTobias Jul 28, 2020
2f2009e
chore(blog): Add i18n theme blog post (#26065)
LekoArts Jul 28, 2020
c7067b9
chore(showcase): add Château de Morey 🏰 (#25683)
JulienKode Jul 28, 2020
5422f2f
chore(showcase): meetup.com (#25792)
Jul 28, 2020
8a33005
chore(gatsby): fix typegen for publishing (#26078)
pieh Jul 29, 2020
385f901
fix(gatsby): Delete babel and terser cache dirs (#26053)
sidharthachatterjee Jul 29, 2020
57d3753
fix(gatsby): Load static query results from its own Db (#26077)
sidharthachatterjee Jul 29, 2020
552d28f
chore(release): Publish
sidharthachatterjee Jul 29, 2020
47ba295
fix(gatsby-image): add required check for one of fluid or fixed (#25371)
ehrencrona Jul 29, 2020
1b0f7a9
fix(gatsby): Load resources in ProdPageRenderer (#26092)
sidharthachatterjee Jul 29, 2020
4203ec0
chore(release): Publish
sidharthachatterjee Jul 29, 2020
7cdc55c
Update gatsby in www
sidharthachatterjee Jul 29, 2020
32bea4b
Add plugincreator to API (#26101)
Jul 29, 2020
93e19e8
chore(showcase): Add Devnet (#25952)
Marin-Matosevic Jul 29, 2020
8bd8ec4
Add pluagin source for page (#26104)
Jul 29, 2020
5b97777
fix(gatsby-source-contentful): support height parameter for srcset (#…
mrseanbaines Jul 29, 2020
2991fa8
chore(docs): Add author Colby Fayock (#26109)
colbyfayock Jul 29, 2020
fc9cb62
Merge remote-tracking branch 'origin/master' into recipes-gui-admin
KyleAMathews Jul 29, 2020
da10393
Use commonmark option to better handle list parsing
johno Jul 30, 2020
9646026
revert fixpack changes to root package.json
KyleAMathews Jul 30, 2020
b113192
Merge master for package updates
johno Jul 30, 2020
b7a34df
Squashed commit of the following:
KyleAMathews Jul 30, 2020
f767924
Actually fix lint error
KyleAMathews Jul 30, 2020
82298a8
Merge branch 'master' into recipes-gui-admin
KyleAMathews Jul 30, 2020
7ef894d
Fix test
KyleAMathews Jul 30, 2020
793a369
more fixing tests
KyleAMathews Jul 30, 2020
74d83b7
Only log when DEBUG=true
KyleAMathews Jul 30, 2020
d693307
Remove --quiet to see errors
KyleAMathews Jul 31, 2020
de079c5
Add rollup
KyleAMathews Jul 31, 2020
80c5950
resolve conflicts
KyleAMathews Jul 31, 2020
75b78b3
remove testing code
KyleAMathews Jul 31, 2020
92b0a88
Make yarn.lock file valid
KyleAMathews Jul 31, 2020
cb3bd7e
WORK PLEASE
KyleAMathews Jul 31, 2020
dc5083d
Add yoga-layout-prebuilt as explicit dependency to make rollup + yarn…
KyleAMathews Aug 1, 2020
482eb39
Add node-fetch as dependency
KyleAMathews Aug 1, 2020
714488f
Update packages/gatsby-recipes/src/graphql-server/server.js
johno Aug 3, 2020
49575d9
Use string matching for NPMPackage versions
johno Aug 3, 2020
8830215
Merge branch 'master' into recipes-gui-admin
KyleAMathews Aug 3, 2020
1b8ebea
Add missing string matcher
johno Aug 3, 2020
4227c45
Fix lint error
johno Aug 3, 2020
33a5d25
Merge remote-tracking branch 'origin/master' into recipes-gui-admin
KyleAMathews Aug 3, 2020
abc85d2
Add missing normalize.css dep
johno Aug 3, 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
6 changes: 2 additions & 4 deletions docs/blog/2019-04-25-plugin-authoring-study/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ ANSWER: make time-consuming things take less time, and make frustrating things l

People who use plugin authoring docs say they are super helpful; however, most people don’t know about them and solve challenges through looking at the source code of other plugins. While this works for many people, we think making this even easier is a positive change.

<!--lint disable no-duplicate-headings-->
## Solution
## Solution to make things less time consuming

- [Gatsby CLI to add scaffolding for source plugin creation #13376](https://github.com/gatsbyjs/gatsby/issues/13376)
- [Invite new Gatsby users to learn more about plugin authoring via CLI #13377](https://github.com/gatsbyjs/gatsby/issues/13377)
Expand All @@ -67,8 +66,7 @@ Examples of things that are confusing:
- Most people don’t know how to write automated tests for plugins and mentioned building a site just to test the plugin, which they felt wasn't the most ideal way to test
- Rebuilding for every change often “feels wrong” to people

<!--lint disable no-duplicate-headings-->
## Solution
## Solution to reduce frustration

[Redesigned the plugin docs](https://github.com/gatsbyjs/gatsby/pull/13261/files) to include a category called "Creating Plugins" where we can document answers to people's concerns; for example, ideas for how to test plugins and advice to use yarn workspaces to avoid yarn link inconsistencies.

Expand Down
24 changes: 22 additions & 2 deletions packages/gatsby-cli/src/create-cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -354,9 +354,29 @@ function buildLocalCommands(cli: yargs.Argv, isLocalSite: boolean): void {
cli.command({
command: `recipes [recipe]`,
describe: `[EXPERIMENTAL] Run a recipe`,
builder: _ =>
_.option(`D`, {
alias: `develop`,
type: `boolean`,
default: false,
describe: `Start recipe in develop mode to live-develop your recipe (defaults to false)`,
}).option(`I`, {
alias: `install`,
type: `boolean`,
default: false,
describe: `Install recipe (defaults to plan mode)`,
}),
handler: handlerP(
async ({ recipe }: yargs.Arguments<{ recipe: string | undefined }>) => {
await recipesHandler(siteInfo.directory, recipe)
async ({
recipe,
develop,
install,
}: yargs.Arguments<{
recipe: string | undefined
develop: boolean
install: boolean
}>) => {
await recipesHandler(siteInfo.directory, recipe, develop, install)
}
),
})
Expand Down
8 changes: 6 additions & 2 deletions packages/gatsby-cli/src/recipes.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
import { trackCli } from "gatsby-telemetry"
import runRecipe, { startGraphQLServer } from "gatsby-recipes"
import { startGraphQLServer, recipesHandler as runRecipe } from "gatsby-recipes"

export async function recipesHandler(
projectRoot: string,
recipe: string | undefined
recipe: string | undefined,
develop: boolean,
install: boolean
): Promise<void> {
trackCli(`RECIPE_RUN`, { name: recipe })

const graphql = await startGraphQLServer(projectRoot)

return runRecipe({
recipe,
isDevelopMode: develop,
isInstallMode: install,
graphqlPort: graphql.port,
projectRoot,
})
Expand Down
7 changes: 7 additions & 0 deletions packages/gatsby-recipes/.babelrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
KyleAMathews marked this conversation as resolved.
Show resolved Hide resolved
"presets": [
["@babel/env", { "modules": false, "targets": { "node": "current" } }],
"@babel/preset-react"
],
"plugins": ["@babel/plugin-transform-runtime"]
}
2 changes: 2 additions & 0 deletions packages/gatsby-recipes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,8 @@ DEBUG=true node --inspect-brk ./node_modules/.bin/gatsby recipes ./test.mdx

Then, open up Chrome and click the node icon in dev tools.

To see log output from the Recipes graphql server, run in a terminal `node node_modules/gatsby-recipes/dist/graphql-server/start-dev-cli-server.js`

### Official recipes

MDX source for the official recipes lives at [https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-recipes/recipes](https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-recipes/recipes).
Expand Down
114 changes: 75 additions & 39 deletions packages/gatsby-recipes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,46 @@
"description": "Core functionality for Gatsby Recipes",
"version": "0.1.58",
"author": "Kyle Mathews <[email protected]>",
"main": "dist/index.js",
"bugs": {
"url": "https://github.com/gatsbyjs/gatsby/issues"
},
"dependencies": {
"@babel/core": "^7.10.3",
"@babel/generator": "^7.10.3",
"@babel/helper-plugin-utils": "^7.10.3",
"@babel/plugin-transform-react-jsx": "^7.10.3",
"@babel/standalone": "^7.10.3",
"@babel/template": "^7.10.3",
"@babel/types": "^7.10.3",
"@graphql-tools/schema": "^6.0.11",
"@graphql-tools/utils": "^6.0.11",
"@hapi/hoek": "8.x",
"@babel/core": "^7.9.6",
"@babel/generator": "^7.9.6",
"@babel/helper-plugin-utils": "^7.8.3",
"@babel/plugin-proposal-optional-chaining": "^7.9.4",
"@babel/plugin-transform-react-jsx": "^7.9.4",
"@babel/standalone": "^7.10.2",
"@babel/template": "^7.8.6",
"@babel/types": "^7.9.6",
"@emotion/core": "^10.0.14",
"@emotion/styled": "^10.0.14",
"@graphql-tools/schema": "^6.0.14",
"@graphql-tools/utils": "^6.0.14",
"@hapi/hoek": "8.x.x",
"@hapi/joi": "^15.1.1",
"@mdx-js/mdx": "^1.6.6",
"@mdx-js/react": "^1.6.6",
"@mdx-js/runtime": "^1.6.6",
"acorn": "^7.3.1",
"@mdx-js/mdx": "^2.0.0-next.4",
KyleAMathews marked this conversation as resolved.
Show resolved Hide resolved
"@mdx-js/react": "^2.0.0-next.4",
"@mdx-js/runtime": "^2.0.0-next.4",
"acorn": "^7.2.0",
"acorn-jsx": "^5.2.0",
"ansi-html": "^0.0.7",
"babel-plugin-remove-export-keywords": "^1.6.5",
"chokidar": "3.4.0",
"concurrently": "^5.0.0",
"contentful-management": "^5.26.3",
"cors": "^2.8.5",
"debug": "^4.1.1",
"detect-port": "^1.3.0",
"dotenv": "^8.2.0",
"execa": "^4.0.2",
"express": "^4.17.1",
"express-graphql": "^0.9.0",
"flatted": "^3.0.0",
"formik": "^2.0.8",
"fs-extra": "^8.1.0",
"gatsby-core-utils": "^1.3.14",
"gatsby-interface": "^0.0.166",
"gatsby-telemetry": "^1.3.24",
"glob": "^7.1.6",
"graphql": "^14.6.0",
Expand All @@ -40,21 +51,23 @@
"graphql-type-json": "^0.3.2",
"hicat": "^0.7.0",
"html-tag-names": "^1.1.5",
"ink": "^2.7.1",
"ink-box": "^1.0.0",
"ink-link": "^1.1.0",
"ink-select-input": "^3.1.2",
"ink-spinner": "^3.1.0",
"is-binary-path": "^2.1.0",
"is-url": "^1.2.4",
"isomorphic-fetch": "^2.1.0",
"jest-diff": "^25.5.0",
"lodash": "^4.17.15",
"mkdirp": "^0.5.1",
"node-fetch": "^2.6.0",
"node-fetch": "^2.5.0",
"p-queue": "^6.4.0",
"pkg-dir": "^4.2.0",
"prettier": "^2.0.5",
"prop-types": "^15.6.1",
"property-information": "5.5.0",
"react-circular-progressbar": "^2.0.0",
"react-icons": "^3.0.1",
"react-reconciler": "^0.25.1",
"remark-mdx": "^1.6.6",
"remark-mdx": "^2.0.0-next.4",
"remark-mdxjs": "^2.0.0-next.4",
"remark-parse": "^6.0.3",
"remark-stringify": "^8.1.0",
"resolve-cwd": "^3.0.0",
Expand All @@ -65,50 +78,73 @@
"subscriptions-transport-ws": "^0.9.16",
"svg-tag-names": "^2.0.1",
"unified": "^8.4.2",
"unist-util-remove": "^2.0.0",
"unist-util-visit": "^2.0.2",
"urql": "^1.9.8",
"urql": "^1.9.7",
"uuid": "^8.2.0",
"ws": "^7.3.0",
"xstate": "^4.11.0"
},
"peerDependencies": {
"react": "^16.12.0"
"xstate": "^4.9.1",
"yoga-layout-prebuilt": "^1.9.6",
"yup": "^0.27.0"
},
"devDependencies": {
"@babel/cli": "^7.10.3",
"@babel/plugin-transform-runtime": "^7.0.0",
"@rollup/plugin-babel": "^5.1.0",
"@rollup/plugin-commonjs": "^14.0.0",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^8.4.0",
"ink": "next",
"ink-select-input": "^4.0.0",
"ink-spinner": "^4.0.0-0",
"react": "^16.12.0",
"rimraf": "^3.0.2",
"rollup": "^2.23.0",
"rollup-plugin-auto-external": "^2.0.0",
"rollup-plugin-internal": "^1.0.0",
"terminal-link": "^2.0.0",
"tmp-promise": "^2.1.0"
},
"homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-recipes#readme",
"jest": {
"testPathIgnorePatterns": [
"/.cache/",
"dist"
],
"testEnvironment": "node"
},
"keywords": [
"gatsby",
"gatsby-recipes",
"mdx"
],
"license": "MIT",
"main": "dist/index.js",
"repository": {
"type": "git",
"url": "https://github.com/gatsbyjs/gatsby.git",
"directory": "packages/gatsby-recipes"
},
"resolutions": {
"graphql": "^14.6.0"
},
"jest": {
"testPathIgnorePatterns": [
"/.cache/",
"dist"
],
"testEnvironment": "node"
"@mdx-js/mdx": "^2.0.0-next.4",
"@mdx-js/react": "^2.0.0-next.4",
"@mdx-js/runtime": "^2.0.0-next.4",
"graphql": "^14.6.0",
"property-information": "5.5.0",
"remark-mdx": "^2.0.0-next.4",
"remark-mdxjs": "^2.0.0-next.4"
KyleAMathews marked this conversation as resolved.
Show resolved Hide resolved
},
"scripts": {
"build": "babel src --out-dir dist --ignore \"**/__tests__\" --extensions \".ts,.js,.tsx\"",
"build:watch": "npm run build -- --watch",
"build": "concurrently \"npm run build:babel\" \"npm run build:rollup\"",
"build:babel": "babel --config-file ./non-rollup-babel.config.js src --out-dir dist --ignore \"**/__tests__\" --extensions \".ts,.js,.tsx\"",
"build:rollup": "rollup -c",
"build:watch": "npm run build:babel -- --watch",
"prebuild": "rimraf dist",
"prepare": "npm run build",
"prewatch": "rimraf dist",
"watch": "npm run build:watch",
"test": "jest",
"test:watch": "jest --watch"
"test:watch": "jest --watch",
"watch": "concurrently \"npm run build:watch\" \"npm run watch:rollup\"",
"watch:rollup": "rollup -c -w"
}
}
10 changes: 5 additions & 5 deletions packages/gatsby-recipes/recipes/animated-page-transitions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,24 @@

This recipe helps you create transitions for animating between entering and exiting Gatsby pages.

This recipe:

---

The first step is installing the NPM packages you need:
Installs these NPM packages:

<NPMPackage name="gatsby-plugin-transition-link" />
<NPMPackage name="gsap" />

---

Add the plugin to your Gatsby config.
Adds the following plugin to your Gatsby config:

<GatsbyPlugin name="gatsby-plugin-transition-link" />

---

Now let's create a few example pages to animate between:
Creates a few example pages to animate between:

<File path="./src/pages/transition-fade.js" content="https://gist.githubusercontent.com/gillkyle/50949d56409c338b427984c8e223034b/raw/4674121deb826f2c17a7acde4f20e9cfe8a268d5/transition-fade.js" />

Expand All @@ -28,5 +30,3 @@ Now let's create a few example pages to animate between:
When you run your site you can navigate to http://localhost:8000/transition-paint-drip to try it out.

See more examples about usage in the docs for the transition link plugin: https://transitionlink.tylerbarnes.ca/docs/

And your recipe is served!
12 changes: 7 additions & 5 deletions packages/gatsby-recipes/recipes/ava.mdx
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
# Add AVA

This recipe helps you setup AVA in your Gatsby site to test components and utilities
This recipe helps you setup AVA in your Gatsby site to test components and utilities.

This recipe:

---

Install the `ava` package
Installs the `ava` package.

<NPMPackage name="ava" />

---

Adding some AVA test files for you to play with
Adds some AVA test files for you to play with.

<File
path="src/ava-example/sum.js"
Expand All @@ -24,9 +26,9 @@ Adding some AVA test files for you to play with

---

Add a `test` & `test:watch` scripts to your package.json.
Adds a `test` & `test:watch` scripts to your package.json.

Now try running `npm run test` — AVA will run your test!
Then you can run `npm run test` — AVA will run your test!

While writing tests you can run `npm run test:watch` and tests will re-run
as you edit them.
Expand Down
Loading