npm installinstalls all the site's dependenciesnpm startruns 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 lintuses ESLint with a bunch 'o plugins to check you're not writing shit syntaxnpm run testruns 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:videosscaffolds video content for recent YouTube videos via the API.npm run sync:booksscaffolds book content for recently-read books using Goodreads export data (download from here).npm run sync:tbrimports 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.