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
Use embedded version of yarn #925
Comments
Yeah, I was considering something like that. It'd be nice to have both Paket and yarn embedded in the apps so yarn is not a hard requirement, but there are two main problems for that:
|
Installing it globally is a bad practice in my opinion :) After, it's to be discuss and perhaps to users. Also, you said yarn isn't a hard requirement and we had this discussion on elmish templates. Conclusion was if you lock the version with paket or yarn you should lock them with the other too. Otherwise, you can result in strange behaviors. |
Those are problems that also affect JS projects, but the yarn team decided to go for global installations. In my personal opinion we should try to go with the flow as much as possible, so users can take advantage of all the existing documentation, community support, etc, and don't be too imaginative for Fable projects. But if you can think of a nice and simple way of embedding yarn and call it nicely I'm not opposed to the idea 😄 |
Could it make sense to add an option into fable cli like: And we would have specify the version of yarn somewhere. So fable check if he already installed this version for the local project. If not take it from somewhere (github, yarn website) and then run yarn automatically to do yarn install. Idea is to hide yarn into dotnet/fable as we do for paket. I know paket is doing all the stuff on dotnet restore but perhaps we can have a middle way for yarn. Waiting to have a better way handling this case :) What is your opinion guys ? |
Hmmm, this is interesting idea. Earlier we are required to maintain sequence of |
Other projects I have seen like the angular/cli, checks for yarn and uses it if available and falls back to npm. We could do the same, but add a warning saying "To get the best experience we recommend using yarn from http://yarnpkg.com to take advantage of the lock files we provide." |
Regardless of local vs global usage, what about msbuild tasks that make it so users would only need the |
@johlrich That looks very interesting! Do you know what it does if yarn is not installed? Can you check if it works with the fable template? |
It does work with the fable template. Here's some comments based on trying it out:
Based on that review I don't know if we'd want to use that package without first addressing some of these things, but I do think it at least proved that the idea of including it in the msbuild/dotnet cli workflow was worth pursuing to simplify the initial experience. |
We can close as user can now use npm5 and yarn. Also, for templates we can give the choice to the user. (Will be available soon on Elmish ones) |
Description
We are using an embedded version of paket.
@kunjee17 asked if we could use an embedded version of yarn too.
I know that we can download yarn.js file directly. see here
I think it's a good idea, as we don't force the user to install it and also different project can use different version of yarn :)
/cc @alfonsogarciacaro @forki
The text was updated successfully, but these errors were encountered: