Companion project for the Creating a Source Plugin Gatsby tutorial.
You'll need to have these tools installed:
You can also follow Part 0: Set Up Your Development Environment for more detailed instructions.
yarn
to install dependenciesyarn test
to run unit testsyarn lint:fix
to run lintingyarn develop:deps
to build & serve the API at http://localhost:4000, and to also watch the source plugin for changesyarn develop:site
in another terminal window to run gatsby develop
for the test siteIf you make changes to the source plugin you will need to restart the site
server to see the changes reflected in the site.
yarn start:api
to build and serve the API at http://localhost:4000
yarn build
in another terminal window to build the production plugin and siteyarn serve:site
to serve the Gatsby site at http://localhost:9000. You should see an overview of all postsThis project includes three directories:
api
is the example mock backend API you will source fromplugin
is the example source pluginsite
is the example siteThe source plugin consumes the API, and the site uses the source plugin.