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

Add explanation of why we install everything as a dependency to the docs #5885

Closed
wants to merge 8 commits into from
Closed

Conversation

attaradev
Copy link
Contributor

This solves issue #5805 @iansu and @Timer
Kindly review my suggested solution
Thanks

This is to solve issue #5805
Added the link to more elaborate resource
@iansu
Copy link
Contributor

iansu commented Nov 23, 2018

I don't think this is the right location for this. It doesn't just apply to ejected apps. I think this page might be a better place for it: https://facebook.github.io/create-react-app/docs/installing-a-dependency

Rather than just linking to the Stack Overflow answer I would like to incorporate the answer into the page. Maybe we add a section to the end of that page that explains why we install everything as a dependency.

@iansu iansu added this to the 2.1.x milestone Nov 23, 2018
@attaradev
Copy link
Contributor Author

Alright. I will work on it @iansu

@attaradev
Copy link
Contributor Author

@iansu When you install a dev dependency after using create react app puts it in devDependency. I think the issue is more with the eject script.

@iansu
Copy link
Contributor

iansu commented Nov 23, 2018

It's true that none of these packages end up in package.json until after you eject so maybe this is the right place to document this. I would still like to explain why instead of just linking to Stack Overflow.

@@ -30,6 +30,8 @@ See the section about [deployment](deployment.md) for more information.

If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project as dependencies in `package.json`. You have full control over them and can always rearrange `package.json` as you deem reasonable. You can read [more here](https://stackoverflow.com/questions/44868453/create-react-app-install-devdepencies-in-dependencies-section)
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe add a new paragraph after "...as dependencies in package.json" where we explain why they are installed as dependencies instead of dev dependencies.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Alright

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@iansu Kindly review this one and let me know what you think

Update the reason and remove the link to stackoverflow
update to reflect consistency in language choice
@@ -30,6 +30,8 @@ See the section about [deployment](deployment.md) for more information.

If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project as dependencies in `package.json`. You have full control over them and can always rearrange `package.json` as you deem reasonable. You can read [more here](https://stackoverflow.com/questions/44868453/create-react-app-install-devdepencies-in-dependencies-section)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@iansu Trust you are good...

Copy link
Contributor Author

@attaradev attaradev left a comment

Choose a reason for hiding this comment

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

@iansu Kindly let me know what you think. Thanks

docusaurus/docs/available-scripts.md Show resolved Hide resolved
@netlify
Copy link

netlify bot commented Dec 1, 2018

Deploy preview for gallant-davinci-8f9bd9 failed.

Built with commit 4be39ea

https://app.netlify.com/sites/gallant-davinci-8f9bd9/deploys/5c037024ec8a896b7b61a8c2

@attaradev
Copy link
Contributor Author

@iansu Why is the build failing?

@attaradev
Copy link
Contributor Author

#6082 The updated edit to the docs

@attaradev
Copy link
Contributor Author

I am closing this pr. Kindly check #6082 for the updated pr.
Thanks

@attaradev attaradev closed this Dec 22, 2018
@lock lock bot locked and limited conversation to collaborators Jan 8, 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.

3 participants