diff --git a/.storybook/main.ts b/.storybook/main.ts index 16c53615..7c226e47 100644 --- a/.storybook/main.ts +++ b/.storybook/main.ts @@ -2,10 +2,9 @@ import path from 'path'; /** @type { import('@storybook/react-webpack5').StorybookConfig } */ const config = { - stories: - process.env.STORYBOOK === 'constellation' - ? ['../src/components/custom-constellation/**/*.stories.@(js|jsx|ts|tsx)'] - : ['../src/components/custom-sdk/**/*.stories.@(js|jsx|ts|tsx)'], + stories: process.env.STORYBOOK_CONSTELLATION + ? ['../src/components/custom-constellation/**/*.stories.@(js|jsx|ts|tsx)'] + : ['../src/components/custom-sdk/**/*.stories.@(js|jsx|ts|tsx)'], typescript: { reactDocgen: 'react-docgen-typescript' diff --git a/.storybook/preview.tsx b/.storybook/preview.tsx index 9c4a5521..7716c48d 100644 --- a/.storybook/preview.tsx +++ b/.storybook/preview.tsx @@ -7,7 +7,7 @@ import { theme } from '../src/theme'; import { decorator } from '../__mocks__/react_pconnect'; -const isConstellation = process.env.STORYBOOK === 'constellation'; +const isConstellation = process.env.STORYBOOK_CONSTELLATION; if (!isConstellation) { getSdkComponentMap(); diff --git a/package.json b/package.json index 5508e766..2482943d 100644 --- a/package.json +++ b/package.json @@ -36,8 +36,8 @@ "publishAll": "dx-component-builder-sdk publishAll", "rename": "dx-component-builder-sdk rename", "scanAndFix": "dx-component-builder-sdk scanAndFix", - "storybookSDK": "STORYBOOK=sdk storybook dev --port 6040", - "storybookConstellation": "STORYBOOK=constellation storybook dev --port 6050", + "storybookSDK": "storybook dev --port 6040", + "storybookConstellation": "STORYBOOK_CONSTELLATION=true storybook dev --port 6050", "_comment_SDK_public_SDK_test_commands": "The following are public commands used for testing the SDK", "test:functional": "jest --runInBand tests/functional/dxcb --detectOpenHandles --coverage", "test": "node ./scripts/playwright-message.js && playwright test --project=chromium MediaCo/portal MediaCo/embedded",