Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
Gatsby boilerplate with TypeScript, SCSS typings, ESLint, Prettier, Husky, and Docker for production projects.
This Gatsby starter boilerplate is a production-ready development environment combining TypeScript, SCSS modules with auto-generated typings, ESLint/Prettier formatting, Husky commit hooks, and Docker support.
It's a starting point for production Gatsby projects, built on Gatsby (React-based) and providing a pre-configured toolchain. It takes a fresh Gatsby project as a base and adds TypeScript, SCSS support with type generation, linting, and Docker workflows. The output is a project you can develop on and build statically with npm run build.
.scss files via a watch script using chokidar and scripts/generateTypings.js, so you can import styles like import * as styles from './styles.module.scss' and get type hints..vscode/settings.json enables formatting on save in VS Code.src/styles/constants/_breakpoints.scss and used with a media mixin, e.g. @include media('>=large') { ... }.src/styles/constants/, with functions and mixins to avoid repeated hardcoded properties.docker-compose mounts the gatsby directory (except node_modules) for hot reloading; yarn devDocker runs the server with the network interface exposed.import Greeting from 'components/Greeting'.build, devLocal, devDocker, watch, fix, and buildScssTypings cover common development tasks.yarn, run yarn devLocal, and get a hot-reloading Gatsby server at http://localhost:8000/.docker-compose build and docker-compose up.After yarn installs packages, yarn devLocal launches the Gatsby dev server and a chokidar watcher that regenerates SCSS typings on file changes. yarn devDocker does the same inside Docker, exposing the full network interface. The watch script uses scripts/generateTypings.js to build .d.ts files for each .scss module.
Run yarn to install all npm packages, then run yarn devLocal to start the Gatsby server plus the file watcher. Access the site at http://localhost:8000/.
Build the image with docker-compose build, then start with docker-compose up. The gatsby directory is mounted so hot reload works, but if you add new packages you need to rebuild the container because installations happen during the build.
watch script for?yarn watch uses chokidar to watch all .scss files and runs buildScssTypings on every change, generating TypeScript definitions so you have type hints on imported style classes.
Create a template in src/templates/ and map it to a URL in src/gatsby/routes.ts. You can also add hooks like onCreatePage in src/gatsby/createPages.ts.
No, the project's todo list explicitly includes "add test library and showcase test driven development," so tests are not yet implemented.