Create-react-app: Conditionally output serve instructions

Created on 8 Jul 2017  路  4Comments  路  Source: facebook/create-react-app

Is this a bug report?

No, Enhancement Request

Summary

If you've got serve already installed globally, asking users to install it becomes redundant.

Example:

skjermbilde 2017-07-08 kl 21 08 23

Current Implementation

Current implementation is that the same instruction gets outputted, even though you'd have serve installed after running yarn build

Proposed

  1. Check global prefix and where the users global folder is installed
  2. Print stdout message if it doesn't exist

Use process.argv to map back to where the global folder is, or you could add global-prefix as a dependency.

https://github.com/facebookincubator/create-react-app/blob/a171d930641f513279b1c7ceaab1fa9bbbbbb896/packages/react-dev-utils/printHostingInstructions.js#L124-L131


Happy hacking :)

claimed starter proposal

All 4 comments

I renamed because we have labels. Thanks for filing!

I'd love to submit a PR for this, do you think that the redundancy is just the line for installing serve? Or is it the whole section mentioning serve?

Nice @OwenFlood ! 馃敟

Was this page helpful?
0 / 5 - 0 ratings