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

recommend iojs #390

Closed
wants to merge 1 commit into from
Closed

recommend iojs #390

wants to merge 1 commit into from

Conversation

jonathanong
Copy link
Member

one thing i'd like to wait for is for nvm/travis to support iojs and start testing on that. i could also push this now

@jonathanong
Copy link
Member Author

shit i forgot the bash command...

@jonathanong
Copy link
Member Author

nvm i don't know what i'm doing haha

@mattma
Copy link

mattma commented Jan 15, 2015

After I installed iojs, i got a command iojs. At the same time, it aliased my system node executable to iojs. Essentially, when you run node xx, it called iojs executable.

/usr/local/bin/node -> iojs

Should we stick with node, by default, iojs will be called when user execute the node binary.

Well, I have not tested in nvm cases, that may need to run iojs explicitly.

@jonathanong
Copy link
Member Author

but the commands don't run with node --harmony-generators if it's iojs. what i thought i was doing was something like alias iojs ?= node --harmony-generators but apparently i forgot how to bash

@mattma
Copy link

mattma commented Jan 15, 2015

alias iojs='node --harmony-generators '

 ➜ which iojs
iojs: aliased to node --harmony-generators

 ➜ iojs xxx.js
node: bad option: --harmony-generators

From iojs docs,

The current behaviour of the --harmony flag on io.js is to enable staged features only. After all, it is now a synonym of --es_staging.

I think the correct Bash command should be

# put it in .bashrc, or .zshrc
alias iojs='node --harmony '

Test the command above

 ➜ which iojs
iojs: aliased to node --harmony

 ➜ iojs xxx.js
# run and log stdout...

@jonathanong
Copy link
Member Author

how do you only alias iojs if it doesn't exist yet

@mattma
Copy link

mattma commented Jan 15, 2015

After some tests on this matter, I think this could be a solution.

if [ ! -x "$(command -v iojs)" ]
then
  alias iojs='node --harmony '
fi

read more about command here

@tj
Copy link
Member

tj commented Jan 15, 2015

typically you do NODE ?= node and run make with NODE=iojs set etc

@jonathanong
Copy link
Member Author

i'd like tests to run without iojs users having to do NODE=iojs :D

@tj
Copy link
Member

tj commented Jan 15, 2015

why? there's only a few people that work on the tests, or we can default it to iojs instead

@jonathanong
Copy link
Member Author

yeah we can default to iojs

@jonathanong jonathanong deleted the iojs branch February 15, 2015 00:51
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.

None yet

3 participants