Environment Validation and Set Up
We are going to primarily be working in a Github repo.
Prior to the workshop, we highly recommend running the validation step(s) below to ensure your machine will be best equipped to get up and running with Gatsby and Drupal.
Requirements
- A GitHub account
- Several globally available dependencies, specifically:
git
npm
(>= 5.0.0)yarn
(>= 1.0.0)- See Why Yarn?
Instructions
We include a helpful validation script, and we are going to use the forking/upstream model so that you can easily commit any changes/branches to your personal copy of the labs.
Fork the repo to your personal account
- We fork so that you can feel free to make commits/branches/etc. and so that you can use this as a base in the future for your actual Gatsby app/blog!
- Consider adding the upstreamgit remote add upstream https://github.com/dschau/gatsby-drupal-bloggit fetch upstream master
Clone the forked repo
git clone https://github.com/your-name/gatsby-drupal-blog labscd labsRun the validation script
npm run validateCome prepared to learn 🎉 You're ready for the labs and workshop!
Why Yarn
Yarn has an excellent feature called Yarn Workspaces, which let us bootstrap a project with multiple folders easily and quickly. In fact, each lab is a standalone folder and project that contains its own unique dependencies and project structure. With NPM, we would have to run npm install
in each folder and Yarn Workspaces allows us to run this install step a single time and have all dependencies available for each and every lab with that one command.
It is not strictly necessary, but do allot a few more minutes for each lab to install dependencies if you do not want to use Yarn.