Clone in order to set up a yarn workspaces based space for developing, running and testing your Gatsby themes
A yarn workspaces composed space for developing, running and testing your Gatsby themes.
Based on Composable yarn workspaces by @ChristopherBiscardi where you simply nest git repos that couldn’t care less about each other :), and we’ve added a demo theme runner!
git clone git@github.com:demystifying-dev/gatsby-composer-for-themes.git my-dev-composer
cd my-dev-composer
yarn
Run demo on port 6209
yarn workspace demo develop -H 0.0.0.0 -p 6209
point browser at http://myserver.org:6209/
Docs and more examples coming, but the basic idea is:
package.json
as runner instead of demo
(docs coming soon)package.json
and configure them in gatsby-config.js
, etc.In this way we can have a project by project monorepo with dependencies handled by yarn workspaces, plus easily re-usable themes without having to make them npm packages (which I would like to avoid as a day-to-day workflow).