Skip to content
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

Merged
merged 2 commits into from
Oct 28, 2016

Conversation

iraquitan
Copy link
Contributor

Please verify the following:

  • Everything works on iOS/Android
  • ignite-base ava tests pass
  • fireDrill.sh passed

Describe 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

standard: Use JavaScript Standard Style (http://standardjs.com)
  /.../ignite/ignite-cli/src/index.es:39:32: Unnecessary escape character: \'.
  /.../ignite/ignite-cli/src/index.es:44:32: Unnecessary escape character: \'.
  /.../ignite/ignite-cli/src/index.es:44:60: Unnecessary escape character: \'.
  /.../ignite/ignite-cli/src/index.es:52:32: Unnecessary escape character: \'.
  /.../ignite/ignite-cli/src/index.es:52:71: Unnecessary escape character: \'.
standard: Use JavaScript Standard Style (http://standardjs.com)
standard: Run `standard --fix` to automatically fix some problems.
  /.../ignite/ignite-generator/src/utilities.js:14:1: More than 1 blank line not allowed.

Check if yarn is installed and use it instead of npm to install packages
in ignite-generator.
Copy link
Member

@kevinvangelder kevinvangelder left a 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
Copy link
Member

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?

Copy link
Member

@GantMan GantMan left a 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`)
Copy link
Member

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')
Copy link
Member

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')) {
Copy link
Member

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.

@GantMan GantMan merged commit 379c41d into infinitered:master Oct 28, 2016
@iraquitan iraquitan deleted the 440-yarn-the-install branch November 7, 2016 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants