Open adeelibr opened 5 years ago
Also the feature where having .template.dependencies.json
file when init a new CRA adds dependencies while installing is also not documented.
If anyone can guide me as to where these need to be documented, i'd love to help in in anyway I can :)
Hello @adeelibr. We don't support .template.dependencies.json officially, but the other methods are supported - but not documented.
I think we need to document scripts-version
at some point, but we need to do it carefully as that feature is not for beginners.
I'd be happy to accept a PR for the first two (excluding template dependencies for now) if you'd like to raise one. I can work on it with you :)
AWESOME! 😄 😄 I'll make a PR and share here @mrmckeb
Small question, which section should I document --use-npm
& --scripts-version
in? 🤔 ðŸ’
That's a very good question. I always have to think about this stuff a lot too.
I recommend we add it to this section, under this (at the same level): https://facebook.github.io/create-react-app/docs/getting-started#creating-a-typescript-app
"Selecting a package manager"
I would mention that by default, Yarn is used to install dependencies when available, and to skip this, you can use the --use-npm
flag.
"Passing through a scripts package"
I would first highlight that by default the latest react-scripts
is used, and that you shouldn't need to use this setting. Also, lean on the fact that this lets you install react-scripts
at any version (--scripts-version react-scripts@#.#.#
).
Then, as a last comment, you could mention that third-party scripts could also be installed using this method, but that the team can't offer support for unofficial scripts and you should reach out to the authors of those for support.
Be warned that this PR may have a bit of discussion around it, as it'll need to go through a few team members - but we'll get it in in some form ;)
Thanks!
Cool thank you. I will make a PR today and share it with you. Thank you again for reviewing my issue. @mrmckeb
@mrmckeb I made an initial poor draft on --use-scripts
flag & wrote it here https://gist.github.com/adeelibr/304da37d0e22a687b1bf6f09c6f10ee6 Can you kindly give me some direction here =)
Thanks @adeelibr. If you want to create a PR for this, we could start the discussion.
I can give more feedback there, but again, this is a PR that might be rejected due to the potential for people to misunderstand and misuse scripts.
I am so sorry for the very late response on this, 😠😞 😥 I have made a PR for documenting --use-script
. I know you are super busy but when ever you get a chance to have a look at it @mrmckeb
There should be mention of the following;
--use-npm
in the documentation, if someone want's to opt out ofyarn
to usenpm
instead.--scripts-version
when over-riding with your own custom react-scripts.I am more than happy to make a PR for this. (I would need some guideance though :))