Skip to content

It doesn't all work yet but it's gettin' there!

Pre-release
Pre-release

Choose a tag to compare

@tonyketcham tonyketcham released this 21 Nov 13:32
· 227 commits to main since this release

The CLI, user config module, filesystem source plugin, and markdown transformer all work!

The playground shows a proof of concept in its package.json where you can boot up Flatbread alongside a dev or build process.

Neat CLI stuff

You can pass Flatbread a peer script to run alongside it by separating the two scripts (and their options) with --:

"scripts": {
  "dev": "flatbread start -o -- svelte-kit dev",
  "flatbread:help": "flatbread start -h",
  "build": "flatbread start -- svelte-kit build",
}

Flatbread captures that second script's options/arguments, automatically detects and uses the package manager you're using (as long as it's pnpm, yarn, or npm), and delays the start of that peer process until Flatbread finishes launching its GraphQL server. This approach cleanly avoids race conditions where your dev server might crank open before Flatbread has had time to parse your content into a schema, etc.

This strategy also allows a nice interface for you to query inside your statically generated apps. You'll get a predictable GraphQL server on a separate process & port from your dev/build process. Flatbread doesn't give a shit what framework you're using. If you can server-side query that endpoint (i.e. http://localhost:5057/graphql) from within your app ( i.e. http://localhost:3000), you're off to the races.

No more global vendor lock-in à la Gatsby/Gridsome; bring the tools you want to use.

New Contributors

Full Changelog: https://github.com/tonyketcham/flatbread/commits/v0.0.2