npm scripts
Sites built with the Carbon Gatsby theme starter come ready to go with some helpful npm scripts. You can run these commands by typing
yarn [command]
npm run [command]
Clean
- clean - this is used to clean gatsby’s cache and public directory. It should be used sparingly, only when you’re experiencing weird errors or caching issues.
Develop
- dev - this is your primary for starting up your gatsby site for development
- dev:clean - this is provided as a convenience; it first runs thencleandev
Build
- build - this is what you’ll use to bundle your site. Gatsby will minimize
your images and create a static, blazing fast site in your directorypublic
- serve - this can be run to serve the bundle locally after running . It can be used to debug locally if any issues are encountered durring build.build
- build:clean - this is a provided as a convenience, it first runs thencleanbuild