storybook: switch to reading stories from components package

Co-authored-by: Juan Lulkin <jmaiz@spotify.com>
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2021-03-10 16:24:21 +01:00
parent 329318847f
commit 9a85135e12
3 changed files with 6 additions and 6 deletions
+3 -3
View File
@@ -3,8 +3,8 @@ const WebpackPluginFailBuildOnWarning = require('./webpack-plugin-fail-build-on-
module.exports = {
stories: [
'../../core/src/layout/**/*.stories.tsx',
'../../core/src/components/**/*.stories.tsx',
'../../components/src/layout/**/*.stories.tsx',
'../../components/src/components/**/*.stories.tsx',
'../../../plugins/**/src/**/*.stories.tsx',
],
addons: [
@@ -15,7 +15,7 @@ module.exports = {
],
webpackFinal: async config => {
/* eslint-disable-next-line no-restricted-syntax */
const coreSrc = path.resolve(__dirname, '../../core/src');
const componentsSrc = path.resolve(__dirname, '../../components/src');
// Mirror config in packages/cli/src/lib/bundler
config.resolve.mainFields = ['browser', 'module', 'main'];
+2 -2
View File
@@ -2,6 +2,6 @@
This package provides a Storybook build for Backstage. See https://backstage.io/storybook/.
## Why is this not part of `@backstage/core`?
## Why is this not part of `@backstage/components`?
This separate storybook package exists because of dependency conflicts with `@backstage/cli`. It uses `nohoist` to avoid the conflicts, and since you can only use that in private packages it has to be separated out of `@backstage/core`.
This separate storybook package exists because of dependency conflicts with `@backstage/cli`. It uses `nohoist` to avoid the conflicts, and since you can only use that in private packages it has to be separated out of `@backstage/components`.
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "storybook",
"version": "0.2.0",
"description": "Storybook build for core package",
"description": "Storybook build for components package",
"private": true,
"scripts": {
"start": "start-storybook -p 6006",