Use Kitbook by Itself

If you are building a library and you want to use Kitbook by itself without a main app, you can do that. This is common when building a component library. First you should [Understand Kitbook's Initialization], then if you want to dig in further you could look in Kitbook’s source code you’ll see the routes folder living inside of the lib directory (so it will be packaged up) or in Svelte Pieces’ source code you won’t see a src/routes folder at all. When you are only building a library and not an app, then there is no main app to run Kitbook alongside and so your Kitbook becomes your main app. You could then just delete the src/routes folder.

Styles Reset

If you are happy with the default Kitbook styles reset, you can go ahead and delete the standard SvelteKit app.html sitting in your repo because Kitbook provides its own. If you prefer to provide your own app.html with your own styles resets and such see [Customizing app.html].

Filtering out stories and variants files from your package

If you are using svelte-package and you don’t want to add your stories and variants files to the output package, you can add a .npmignore file to your repo and add the following to it:

*.variants.ts
**/*.md
*.svx
Edit page on GitHub
Instrument Panel