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

Suggest yarn usage for adding flow-bin #1329

Closed
wants to merge 1 commit into from
Closed

Conversation

rgbkrk
Copy link

@rgbkrk rgbkrk commented Dec 29, 2016

npm -> yarn, per other guidance on initialization of a create-react-app.

@fson
Copy link
Contributor

fson commented Dec 30, 2016

If we were to recommend yarn instead of npm in the docs, I think we should convert all npm commands at once and consistently use yarn everywhere. Having it in only some of the examples is going to be confusing, because you might not know what Yarn is and now you also need to figure that out when installing Flow, for example.

Also issues in #1189 need to be fixed before we want to recommend Yarn as the default option.

@fson fson closed this Dec 30, 2016
@rgbkrk
Copy link
Author

rgbkrk commented Dec 30, 2016

Cool, thanks for responding to my PR so quickly. Amusingly, the reason that I filed this PR was because create-react-app has only been showing me yarn commands.


Steps for how I got here as a user:

Run create-react-app

$ create-react-app trial
Creating a new React app in /Users/kylek/trial.

Installing packages. This might take a couple minutes.
Installing react-scripts...

yarn add v0.18.1
info No lockfile found.
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 📃  Building fresh packages...
success Saved lockfile.
success Saved 14 new dependencies.
├─ core-js@1.2.7
├─ encoding@0.1.12
├─ fbjs@0.8.8
├─ iconv-lite@0.4.15
├─ is-stream@1.1.0
├─ isomorphic-fetch@2.2.1
├─ loose-envify@1.3.0
├─ node-fetch@1.6.3
├─ promise@7.1.1
├─ react-dom@15.4.1
├─ react@15.4.1
├─ setimmediate@1.0.5
├─ ua-parser-js@0.7.12
└─ whatwg-fetch@1.0.0
✨  Done in 51.30s.

Success! Created trial at /Users/kylek/trial
Inside that directory, you can run several commands:

  yarn start
    Starts the development server.

  yarn run build
    Bundles the app into static files for production.

  yarn test
    Starts the test runner.

  yarn run eject
    Removes this tool and copies build dependencies, configuration files
    and scripts into the app directory. If you do this, you can’t go back!

We suggest that you begin by typing:

  cd trial
  yarn start

Happy hacking!
  • Desire flow
  • Flip to the flow section of the README
  • Notice that instructions are npm-style rather than the yarn-style that was put on my console
  • Look up the yarn syntax for adding a dev dependency
  • File this PR

@rgbkrk rgbkrk deleted the patch-1 branch December 30, 2016 20:33
@fson
Copy link
Contributor

fson commented Dec 31, 2016

The Yarn integration at the moment is opt in -- CRA only uses it if you have it installed. I can see how this transition phase is less than ideal for Yarn users because all the docs still use npm. But I hope it won't be long till we can make Yarn the recommendation for all users, at which point I think we should just convert all the examples to use it.

@lock lock bot locked and limited conversation to collaborators Jan 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants