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

feat: add eject command #54

Merged
merged 2 commits into from
Feb 16, 2022
Merged

feat: add eject command #54

merged 2 commits into from
Feb 16, 2022

Conversation

yannbf
Copy link
Member

@yannbf yannbf commented Feb 16, 2022

Issue: #42

Running eject for the first time:
image

And in case the config file already exists, it will notify the user (but still override it without prompting)
image

Improvement points/challenges for later

  • Using the test-runner in monorepos. Very likely the logic to detect and use the config file is not ready for that
  • Adding inquirer or any other library to allow for prompting user to things like (are you sure you want to override ; we detected an external storybook url, do you want to use stories-json flag)
📦 Published PR as canary version: 0.0.3-canary.54.04b73e7.0

✨ Test out this PR locally via:

npm install @storybook/[email protected]
# or 
yarn add @storybook/[email protected]

Version

Published prerelease version: v0.0.3-next.4

Changelog

🐛 Bug Fix

  • feat: add eject command #54 (@yannbf)
  • Test-runner file for hook configuration #53 (@shilman)
  • feat: add update snapshot command to cli #52 (@yannbf)
  • fix: improve error message in start-storybook #51 (@yannbf)
  • Respect stories defined in main.js #46 (@yannbf)

Authors: 2

@yannbf yannbf added feature request New feature or request patch Increment the patch version when merged labels Feb 16, 2022
@yannbf yannbf changed the base branch from feat/non-eject-customization to next February 16, 2022 14:49
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! 🚀

bin/test-storybook.js Outdated Show resolved Hide resolved
@yannbf yannbf merged commit e0be3b1 into next Feb 16, 2022
@@ -114,7 +114,7 @@ function ejectConfiguration () {
const fileAlreadyExists = fs.existsSync(destination)

if(fileAlreadyExists) {
console.log('[test-runner] Found existing file, overriding...')
throw new Error('Found existing file. Please delete it and rerun this command')
Copy link
Member

Choose a reason for hiding this comment

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

print file location? @yannbf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request patch Increment the patch version when merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants