Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(react): update to exclude stories from folders labeled next #9920

Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/carbon-react/.storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ module.exports = {
'./Welcome/Welcome.stories.js',
'../src/**/*.stories.js',
'../src/**/*.stories.mdx',
'../../react/src/**/next/*.stories.js',
'../../react/src/**/next/*.stories.mdx',
],
webpack(config) {
const babelLoader = config.module.rules.find((rule) => {
Expand Down
17 changes: 12 additions & 5 deletions packages/react/.storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

'use strict';

const glob = require('fast-glob');
const path = require('path');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const customProperties = require('postcss-custom-properties');
Expand Down Expand Up @@ -36,11 +37,17 @@ module.exports = {
require.resolve('./addon-theme/register'),
],

stories: [
'./Welcome/Welcome.stories.js',
'../src/**/*-story.js',
'../src/**/*.stories.mdx',
],
stories: glob.sync(
[
'./Welcome/Welcome.stories.js',
'../src/**/*-story.js',
'../src/**/*.stories.mdx',
],
{
cwd: __dirname,
ignore: ['../**/next/**'],
}
),

webpack(config) {
const babelLoader = config.module.rules.find((rule) => {
Expand Down
1 change: 1 addition & 0 deletions packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@
"css-loader": "^3.4.2",
"cypress": "^8.1.0",
"cypress-real-events": "^1.5.1",
"fast-glob": "^3.2.7",
"fast-sass-loader": "^1.5.0",
"gzip-size": "^6.0.0",
"lcov2badge": "^0.1.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import {
} from '@carbon/icons-react';
import { withKnobs, boolean, select } from '@storybook/addon-knobs';
import React from 'react';
import { Popover, PopoverContent } from '../Popover';
import Button from '../Button';
import { Popover, PopoverContent } from '../../Popover';
import Button from '../../Button';
import mdx from './Popover.mdx';
import { useOutsideClick } from '../../internal/useOutsideClick';
import { useOutsideClick } from '../../../internal/useOutsideClick';

export default {
title: 'Experimental/unstable_Popover',
Expand Down
1 change: 1 addition & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10348,6 +10348,7 @@ __metadata:
cypress: ^8.1.0
cypress-real-events: ^1.5.1
downshift: 5.2.1
fast-glob: ^3.2.7
fast-sass-loader: ^1.5.0
flatpickr: 4.6.9
gzip-size: ^6.0.0
Expand Down