-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
feat: Add yarn to install packages #458
Conversation
Check if yarn is installed and use it instead of npm to install packages in ignite-generator.
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.
Looks good to me.
commandOpts.push('install') | ||
this.log(`\n➟ Package manager:\t[ ]︎ npm | [${check}]︎ yarn`) | ||
} | ||
|
||
// run the npm command |
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.
Nit-picky, but could you change this comment to Install node modules
?
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.
This looks great! I did my nitpicking because I do that kinda thing to keep communication flowing. Code looks great! 👍
} else { | ||
command = 'yarn' | ||
commandOpts.push('install') | ||
this.log(`\n➟ Package manager:\t[ ]︎ npm | [${check}]︎ 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.
I love this layout
this.log(`\n➟ Package manager:\t[${check}]︎ npm | [ ]︎ yarn`) | ||
} else { | ||
command = 'yarn' | ||
commandOpts.push('install') |
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.
yarn doesn't need install, but I see why you added it.
let commandOpts = [] | ||
|
||
// Use Yarn if it is installed | ||
if (!Shell.which('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.
in the future I always found if (trueCondition) true else false condition
more readable than if (not true) false else true condition
I know that's a nit, but if Ruby programming taught me anything, it's that removing inversions like that increases readability speed more than I ever thought it would.
Please verify the following:
ignite-base
ava tests passfireDrill.sh
passedDescribe your PR
Check if yarn is installed and use it instead of npm to install packages
in ignite-generator.
Everything works on iOS/Android
Only checked the iOS app and everything works.
fireDrill.sh output