-
Notifications
You must be signed in to change notification settings - Fork 5
support yarn #15
support yarn #15
Conversation
They did exactly this at create-react-app and got a significant speedup. |
@ekryski @daffl This adds yarn support as per how it appears to be implemented in generator-feathers but I think it could use a bit more logic to check if yarn is installed so that in the cases where first timers try it, the fall back to NPM is still supported. I think this would be better then giving a configuration option as it's mostly gonna be the same for the duration of a systems lifetime and not likely to change project to project so this is just prompt clutter. |
This looks good, I think we should merge it. What would be the best way to test for Yarn? Trying to see if running |
That's what I was thinking. I wanted to add that before merging this but it's been a busy week. I'll get to it soon, merge and then move onto the missing adapters.
|
@daffl this should be ready now. |
// if not yarn, fall back to npm | ||
let yarn = spawn('yarn', ['--version']); | ||
if(yarn.error) { | ||
delete template['engines']['yarn']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. Do you think we should backport this to the current version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't hurt. Dynamic fallback is a nice feature.
Yarn will make generators a lot faster. So if the user has it installed we should use that and have a fallback to npm.