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

CLI: Add additional files api to sb repro #18389

Merged
merged 5 commits into from
Jun 6, 2022
Merged

Conversation

yannbf
Copy link
Member

@yannbf yannbf commented Jun 2, 2022

Issue: N/A

What I did

Added additionalFiles to repro config, so that we can add files before initializing Storybook.

Looks like this:

export const react = {
  framework: 'react',
  name: 'react',
  version: 'latest',
  generator: fromDeps('react', 'react-dom'),
  additionalDeps: ['prop-types'],
  additionalFiles: [
    { 
      path: '.babelrc',
      contents: dedent`
        {
          "presets": ["@babel/preset-env"]
        }
      `,
    }
  ]
};

How to test

  • Is this testable with Jest or Chromatic screenshots?
  • Does this need a new example in the kitchen sink apps?
  • Does this need an update to the documentation?

If your answer is yes to any of these, please make sure to include it in your PR.

@nx-cloud
Copy link

nx-cloud bot commented Jun 2, 2022

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 4f5b90e. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

@yannbf yannbf requested a review from ndelangen June 2, 2022 13:17
yannbf added 2 commits June 2, 2022 20:47
Seems like it changed in version 14. From --skipInstall to --skip-install
@yannbf yannbf force-pushed the feat/cli-add-additional-files branch from 2c3c71b to 27c8357 Compare June 2, 2022 18:51
@codecov
Copy link

codecov bot commented Jun 3, 2022

Codecov Report

Merging #18389 (4f5b90e) into next (95bd68d) will decrease coverage by 0.00%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             next   #18389      +/-   ##
==========================================
- Coverage   32.05%   32.04%   -0.01%     
==========================================
  Files         975      975              
  Lines       19211    19216       +5     
  Branches     4031     4031              
==========================================
  Hits         6158     6158              
- Misses      12490    12494       +4     
- Partials      563      564       +1     
Impacted Files Coverage Δ
lib/cli/src/repro-generators/configs.ts 0.00% <ø> (ø)
lib/cli/src/repro-generators/scripts.ts 0.00% <0.00%> (ø)
addons/a11y/src/components/A11YPanel.tsx 84.09% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 95bd68d...4f5b90e. Read the comment docs.

Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM -- any idea what's up with the codecov comments in the review mode? it's really annoying

lib/cli/src/repro-generators/scripts.ts Outdated Show resolved Hide resolved
lib/cli/src/repro-generators/scripts.ts Outdated Show resolved Hide resolved
@yannbf
Copy link
Member Author

yannbf commented Jun 6, 2022

LGTM -- any idea what's up with the codecov comments in the review mode? it's really annoying

Definitely annoying – I think the "problem" was introduced with the A11yPanel component changes from another PR: https://app.codecov.io/gh/storybookjs/storybook/compare/18389/changes

@yannbf yannbf requested a review from shilman June 6, 2022 12:50
@shilman shilman changed the title chore(repro): add additional files api to sb repro CLI: Add additional files api to sb repro Jun 6, 2022
Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! 💯

@shilman shilman merged commit 9d3e860 into next Jun 6, 2022
@shilman shilman deleted the feat/cli-add-additional-files branch June 6, 2022 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants