mirror of
https://github.com/theoludwig/theoludwig.git
synced 2025-05-29 22:37:44 +02:00
chore: config updates
This commit is contained in:
@ -7,7 +7,11 @@ const config: StorybookConfig = {
|
||||
docs: {
|
||||
defaultName: "Documentation",
|
||||
},
|
||||
stories: ["../../../packages/**/*.stories.tsx", "../stories/*.mdx"],
|
||||
stories: [
|
||||
"../../../packages/ui/src/**/*.stories.tsx",
|
||||
"../../../packages/blog/src/**/*.stories.tsx",
|
||||
"../stories/*.mdx",
|
||||
],
|
||||
addons: [
|
||||
"@storybook/addon-essentials",
|
||||
"@storybook/addon-storysource",
|
||||
|
@ -1,7 +1,7 @@
|
||||
import "@repo/config-tailwind/styles.css"
|
||||
import { defaultTranslationValues } from "@repo/i18n/config"
|
||||
import i18nMessagesEnglish from "@repo/i18n/translations/en-US.json"
|
||||
import type { Locale } from "@repo/utils/constants"
|
||||
import { LOCALE_DEFAULT } from "@repo/utils/constants"
|
||||
import type { Preview } from "@storybook/react"
|
||||
import { NextIntlClientProvider } from "next-intl"
|
||||
import { ThemeProvider as NextThemeProvider } from "next-themes"
|
||||
@ -25,6 +25,7 @@ const preview: Preview = {
|
||||
stylePreview: true,
|
||||
},
|
||||
controls: {
|
||||
disableSaveFromUI: true,
|
||||
matchers: {
|
||||
color: /(background|color)$/i,
|
||||
date: /Date$/i,
|
||||
@ -33,14 +34,13 @@ const preview: Preview = {
|
||||
},
|
||||
decorators: [
|
||||
(Story) => {
|
||||
const locale = "en-US" satisfies Locale
|
||||
|
||||
return (
|
||||
<NextThemeProvider enableColorScheme={false}>
|
||||
<NextIntlClientProvider
|
||||
messages={i18nMessagesEnglish}
|
||||
locale={locale}
|
||||
locale={LOCALE_DEFAULT}
|
||||
defaultTranslationValues={defaultTranslationValues}
|
||||
timeZone={process.env["TZ"] ?? "UTC"}
|
||||
>
|
||||
<Story />
|
||||
</NextIntlClientProvider>
|
||||
|
@ -7,9 +7,9 @@
|
||||
"build": "storybook build",
|
||||
"dev": "storybook dev --port 6006 --no-open",
|
||||
"start": "http-server \"storybook-static\" --port 6006 --silent",
|
||||
"test": "start-server-and-test \"dev\" http://127.0.0.1:6006 \"test:storybook\"",
|
||||
"test:storybook": "test-storybook",
|
||||
"test:storybook-coverage": "test-storybook --coverage",
|
||||
"test": "start-server-and-test \"start\" http://127.0.0.1:6006 \"test:storybook\"",
|
||||
"test:dev": "start-server-and-test \"dev\" http://127.0.0.1:6006 \"test:storybook\"",
|
||||
"test:storybook": "test-storybook --testTimeout=60000 --maxWorkers=2",
|
||||
"chromatic": "chromatic"
|
||||
},
|
||||
"dependencies": {
|
||||
|
@ -2,7 +2,11 @@ import sharedConfig from "@repo/config-tailwind"
|
||||
|
||||
/** @type {Pick<import('tailwindcss').Config, "presets" | "content">} */
|
||||
const config = {
|
||||
content: [".storybook/preview.tsx", "../../packages/*/src/**/*.tsx"],
|
||||
content: [
|
||||
".storybook/preview.tsx",
|
||||
"../../packages/ui/src/**/*.tsx",
|
||||
"../../packages/blog/src/**/*.tsx",
|
||||
],
|
||||
presets: [sharedConfig],
|
||||
}
|
||||
|
||||
|
9
apps/storybook/turbo.json
Normal file
9
apps/storybook/turbo.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"$schema": "https://turbo.build/schema.json",
|
||||
"extends": ["//"],
|
||||
"tasks": {
|
||||
"test": {
|
||||
"dependsOn": ["^test", "build"]
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user