Skip to content

Commit

Permalink
chore(react): update to exclude stories from folders labeled next (#9920
Browse files Browse the repository at this point in the history
)

* 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>
  • Loading branch information
joshblack and kodiakhq[bot] committed Oct 25, 2021
1 parent 877e478 commit 39091b0
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 8 deletions.
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

0 comments on commit 39091b0

Please sign in to comment.