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

Skip preflight check when starting cra kitchen sink #4408

Merged
merged 4 commits into from
Oct 14, 2018

Conversation

chadfawcett
Copy link
Member

Issue: Resolves #4376

What I did

Added a preflight check env variable before starting the cra kitchen sink app. This allows the app to start without complaining about slight version conflicts upstream.

How to test

cd examples/cra-kitchen-sink && yarn start

@codecov
Copy link

codecov bot commented Oct 13, 2018

Codecov Report

Merging #4408 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #4408   +/-   ##
=======================================
  Coverage   36.02%   36.02%           
=======================================
  Files         557      557           
  Lines        6643     6643           
  Branches      869      869           
=======================================
  Hits         2393     2393           
  Misses       3805     3805           
  Partials      445      445

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 075fea3...dbae5d5. Read the comment docs.

@@ -6,7 +6,7 @@
"build": "react-scripts build",
"build-storybook": "build-storybook -s public",
"eject": "react-scripts eject",
"start": "react-scripts start",
"start": "SKIP_PREFLIGHT_CHECK=true react-scripts start",
Copy link
Member

Choose a reason for hiding this comment

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

the error message recommends using .env file for that

Copy link
Member Author

Choose a reason for hiding this comment

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

Sorry, you're right. I thought if it was in a .env file we'd have to source it resulting in the same amount of code. Turns out react-scripts will do that for us.

However, .env is in examples/cra-kitchen-sink/.gitignore so it can't be committed. What is the better solution here, leave things as they are, or remove .env from the git ignore?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, let's remove it from gitignore

@Hypnosphi Hypnosphi added the maintenance User-facing maintenance tasks label Oct 13, 2018
@Hypnosphi Hypnosphi merged commit 5ca3d5b into storybookjs:master Oct 14, 2018
@chadfawcett chadfawcett deleted the fix-cra-kitchen-sink-start branch October 14, 2018 00:19
@Hypnosphi
Copy link
Member

We definitely should reflect it in docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance User-facing maintenance tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants