Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dominikg/sveltekit-storybook-inlang
https://github.com/dominikg/sveltekit-storybook-inlang
Last synced: 18 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/dominikg/sveltekit-storybook-inlang
- Owner: dominikg
- Created: 2023-08-22T07:53:19.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-08-22T17:27:49.000Z (over 1 year ago)
- Last Synced: 2024-10-28T19:24:20.124Z (2 months ago)
- Language: TypeScript
- Size: 98.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Demo of how to use inlang with storybook
injects a custom Decorator to make the inlang runtime available on context
Credits to Jeppe Reinhold from storybook and Ivan Hofer from inlang for pointing in the right direction!
# Warning
This is not production ready and can break any time inlang internals change.
There will be a nicer way to do this in the future# steps taken to set up this repo
```shell
pnpm create svelte@latest sveltekit-storybook-inlang
cd sveltekit-storybook-inlang
pnpm i
pnpm dlx storybook init
rm -rf src/stories
pnpm add -D @inlang/sdk-js
# edit vite.config.ts to add inlang plugin according to https://inlang.com/documentation/sdk/sveltekit
pnpm dev # inlang generates languages
# add InlangWelcome.svelte and InlangWelcome.stories.ts
pnpm storybook
# notice some errors, fiddle around for a while
# add inlang-runtime.ts and InlangContextWrapper
```