Skip to content

Commit 39091b0

Browse files
chore(react): update to exclude stories from folders labeled next (#9920)
* chore(react): update to exclude stories from folders labeled next * chore(react): update popover story to next format Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
1 parent 877e478 commit 39091b0

File tree

7 files changed

+19
-8
lines changed

7 files changed

+19
-8
lines changed

packages/carbon-react/.storybook/main.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ module.exports = {
2828
'./Welcome/Welcome.stories.js',
2929
'../src/**/*.stories.js',
3030
'../src/**/*.stories.mdx',
31+
'../../react/src/**/next/*.stories.js',
32+
'../../react/src/**/next/*.stories.mdx',
3133
],
3234
webpack(config) {
3335
const babelLoader = config.module.rules.find((rule) => {

packages/react/.storybook/main.js

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
'use strict';
99

10+
const glob = require('fast-glob');
1011
const path = require('path');
1112
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
1213
const customProperties = require('postcss-custom-properties');
@@ -36,11 +37,17 @@ module.exports = {
3637
require.resolve('./addon-theme/register'),
3738
],
3839

39-
stories: [
40-
'./Welcome/Welcome.stories.js',
41-
'../src/**/*-story.js',
42-
'../src/**/*.stories.mdx',
43-
],
40+
stories: glob.sync(
41+
[
42+
'./Welcome/Welcome.stories.js',
43+
'../src/**/*-story.js',
44+
'../src/**/*.stories.mdx',
45+
],
46+
{
47+
cwd: __dirname,
48+
ignore: ['../**/next/**'],
49+
}
50+
),
4451

4552
webpack(config) {
4653
const babelLoader = config.module.rules.find((rule) => {

packages/react/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@
110110
"css-loader": "^3.4.2",
111111
"cypress": "^8.1.0",
112112
"cypress-real-events": "^1.5.1",
113+
"fast-glob": "^3.2.7",
113114
"fast-sass-loader": "^1.5.0",
114115
"gzip-size": "^6.0.0",
115116
"lcov2badge": "^0.1.0",
File renamed without changes.

packages/react/src/components/Popover/Popover-story.js renamed to packages/react/src/components/Popover/next/Popover.stories.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ import {
1414
} from '@carbon/icons-react';
1515
import { withKnobs, boolean, select } from '@storybook/addon-knobs';
1616
import React from 'react';
17-
import { Popover, PopoverContent } from '../Popover';
18-
import Button from '../Button';
17+
import { Popover, PopoverContent } from '../../Popover';
18+
import Button from '../../Button';
1919
import mdx from './Popover.mdx';
20-
import { useOutsideClick } from '../../internal/useOutsideClick';
20+
import { useOutsideClick } from '../../../internal/useOutsideClick';
2121

2222
export default {
2323
title: 'Experimental/unstable_Popover',
File renamed without changes.

yarn.lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10348,6 +10348,7 @@ __metadata:
1034810348
cypress: ^8.1.0
1034910349
cypress-real-events: ^1.5.1
1035010350
downshift: 5.2.1
10351+
fast-glob: ^3.2.7
1035110352
fast-sass-loader: ^1.5.0
1035210353
flatpickr: 4.6.9
1035310354
gzip-size: ^6.0.0

0 commit comments

Comments
 (0)