npm install
installs all the site's dependenciesnpm start
runs Gatsby in dev mode on localhost:2000
- We use Typescript for type checking, and it's hella strict
- We use Prettier for consistent code styling, set it up for your editor with these instructions to run on file save
npm run lint
uses ESLint with a bunch 'o plugins to check you're not writing shit syntaxnpm run test
runs Jest for all the unit tests
The site is deployed to pouretrebelle.github.io/chareads.com on the gh-pages
branch. This is run automatically by GitHub Actions for every commit to main, and at midnight every night.
Part of the build script runs a script to scrape the current video stats from the YouTube API, this is reliant on a YOUTUBE_API_TOKEN
env var.
npm run sync:videos
scaffolds video content for recent YouTube videos via the API.npm run sync:books
scaffolds book content for recently-read books using Goodreads export data (download from here).npm run sync:tbr
imports data for unread Goodreads books, to add affiliate links to timestamp references
The video and book sync scripts take a count argument, for example use npm run sync:videos -- 2
to scaffold the two most recent videos.