-
Notifications
You must be signed in to change notification settings - Fork 24.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
[CLI] Remove dependency on Ruby #440
Conversation
0c6d22a
to
80d835a
Compare
Sweet! init.sh should be outside of the cli folder. Since the cli is global, it's super hard to update. What it does is just forward all the commands to react-native which can be updated easily. |
7fb25db
to
1a2357b
Compare
Ah that makes sense, global packages are annoying to update. Moved it back out. |
Looks good, i'll test it and merge it later today or tomorrow, thanks! |
1a2357b
to
10a2c5a
Compare
@@ -1,44 +1,50 @@ | |||
#!/usr/bin/env ruby | |||
#!/usr/bin/env node |
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 file no longer has to be invoked via shell. Since it's all JS, you can just require
and run it from cli.js
Awesome job @JoeStanton! I have a few suggestions - see inline comments |
} | ||
end | ||
if (process.argv.length === 0) { | ||
console.log('Usage: ' + path.basename(__filename) + ' <ProjectNameInCamelCase>'); |
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.
Not 100% on this, but from when I started this over the weekend as well, I think that ruby’s __FILE__
returns just the filename (init.sh
), while node’s __filename
includes the full path resolution (/Users/user/path/to/react-native/init.sh
).
@frantic what happened to this? Can we resurrect it? |
Hey! My fault - Life got in the way for a few weeks. I can finish this up in the next couple of days if there's still the appetite for it? |
@JoeStanton yes please! |
This will remove the dependency on Ruby.
2f43e1d
to
71abc5f
Compare
b15f5ed
to
526890d
Compare
8571ce3
to
52e7b80
Compare
Hey Guys - Finally had a little bit of time, can you take a look at this? AFAIK I can't put Secondly, the |
52e7b80
to
9caee32
Compare
@JoeStanton you can't put it in react-native-cli, but you CAN put it in local-cli (that's the right place where to put it) |
Excellent - fixed that up. |
} | ||
|
||
function walk(current) { | ||
if(fs.lstatSync(current).isDirectory()) { |
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: space after if
Thanks, a few minor details and we're good to go :) |
d145224
to
04832e5
Compare
Oh you are right, nevermind me |
Resolves #275, #293. Discussed in #405.
Rewritten the init script in Node to remove the dependency on Ruby. I've also moved it into the
react-native-cli
directory as I thought it was cleaner.