-
Notifications
You must be signed in to change notification settings - Fork 906
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
Get rid of a global "react-native-cli" package #76
Comments
This is a good topic to discuss. Today we do: npx react-native-cli init MyProject (actually RN docs suggests installing a global package, which it's yuck, and we should change it once we're done with this discussion) And that's nice, because it does everything for us in one command. What's not cool about it however, is that this time user would call Personally I think it would be easy enough to start a project like this: yarn init # or npm init
yarn add react-native
yarn react-native init MyProject One package to rule them all. But more verbose. And worse for project maintainers creating new projects all the time (let's say that's not an issue). The next alternative is to have this baked into npx react-native init MyProject Better! But there's quite a bunch of stuff to download for The takeaway is that imho to make the CLI experience delightful for RN users is to make it be a single package ( |
Oh cool! I like Not too concerned with the initial download size difference because if you're starting a react-native project you're going to download react-native. Think of it as warming the cache |
One thing to consider is that |
do you mean npx or npm? |
They use the same cache for global modules. |
I thought npx was for executing stuff, but I guess it can also install stuff, in which case it would use the npm cache. cool :) I guess if people use npm and npx, that's fine. if they use yarn and yarn foo, that's also fine. if they combine, then sure, 2 caches, but that's something people should know in general, not just for this issue. so the warming up is a valid reason here I think. |
@cpojer is there a proposal for |
I don't think there is but since the logic is already there with |
Time to prepare a RFC for this then. I'll try to set this up this week, but if anybody willing to work on it earlier, feel free to do so and make us know :) |
FYI I've spoken to @arcanis and I plan to PR a new So, if you're npm fan you'll use
And for Yarn lovers:
How does that sound? |
I think that's good. We could make it so that |
You mean for the back compat? I thought about ditching that package and don't mention it in official docs |
Yeah, for backwards compat we should probably do it. |
isn't |
@thymikee I'm not in love with it - it seems to do the same as |
I'll let you all know once I make RFC, I didn't post everything in my comment :D |
FYI yarnpkg/rfcs#113 |
We're not getting rid of it, however some day we'll remove the legacy |
Waiting for the detailed write-up from @thymikee on this one.
The text was updated successfully, but these errors were encountered: