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"]
|
||||
}
|
||||
}
|
||||
}
|
@ -7,7 +7,7 @@
|
||||
"plugins": ["@typescript-eslint"],
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"parserOptions": {
|
||||
"project": true
|
||||
"projectService": true
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -8,7 +8,7 @@ WORKDIR /usr/src/app
|
||||
|
||||
FROM node-pnpm AS builder
|
||||
COPY ./ ./
|
||||
RUN pnpm install --global turbo@2.1.1
|
||||
RUN pnpm install --global turbo@2.1.3
|
||||
RUN turbo prune @repo/website --docker
|
||||
|
||||
FROM node-pnpm AS installer
|
||||
|
2
apps/website/next-env.d.ts
vendored
2
apps/website/next-env.d.ts
vendored
@ -2,4 +2,4 @@
|
||||
/// <reference types="next/image-types/global" />
|
||||
|
||||
// NOTE: This file should not be edited
|
||||
// see https://nextjs.org/docs/basic-features/typescript for more information.
|
||||
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
|
||||
|
@ -5,6 +5,10 @@ const IS_STANDALONE = process.env.IS_STANDALONE === "true"
|
||||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {
|
||||
output: IS_STANDALONE ? "standalone" : undefined,
|
||||
images: {
|
||||
unoptimized: true,
|
||||
},
|
||||
compress: false,
|
||||
|
||||
// https://github.com/hashicorp/next-mdx-remote/issues/436#issuecomment-2066971842
|
||||
transpilePackages: ["next-mdx-remote", "shiki"],
|
||||
|
@ -22,8 +22,7 @@
|
||||
"next": "catalog:",
|
||||
"next-intl": "catalog:",
|
||||
"react": "catalog:",
|
||||
"react-dom": "catalog:",
|
||||
"sharp": "catalog:"
|
||||
"react-dom": "catalog:"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@repo/eslint-config": "workspace:*",
|
||||
|
@ -2,7 +2,11 @@ import sharedConfig from "@repo/config-tailwind"
|
||||
|
||||
/** @type {Pick<import('tailwindcss').Config, "presets" | "content">} */
|
||||
const config = {
|
||||
content: ["./app/**/*.tsx", "../../packages/*/src/**/*.tsx"],
|
||||
content: [
|
||||
"./app/**/*.tsx",
|
||||
"../../packages/ui/src/**/*.tsx",
|
||||
"../../packages/blog/src/**/*.tsx",
|
||||
],
|
||||
presets: [sharedConfig],
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user