LoginSignup
8
8

More than 5 years have passed since last update.

Nodeやio.jsのpreバージョンをビルドしてnvmから使う

Last updated at Posted at 2014-12-30
git clone git@github.com:joyent/node.git
cd node
./configure --prefix=~/.nvm/versions/v0.13.0-pre
make -j10
make install
git clone git@github.com:iojs/io.js.git
cd io.js
./configure --prefix=~/.nvm/v0.11.15-pre
make -j10
make install

nodeの方は現在のmasterブランチをビルドするとv0.13.0-preになり、io.jsはv0.11.15-preになる。このバージョン番号をうまくあわせないと認識できないっぽい。

https://github.com/creationix/nvm/blob/master/nvm.sh#L161
このへん読むとv0.12.0を境に配置ディレクトリが変わるっぽいので配置先もあわせた。

でもnodeはv0.12ブランチのが進んでいる?のでこっちのがいいかもしれない。
https://github.com/joyent/node/commits/v0.12

$ nvm ls
    v0.10.31
    v0.11.14
    v0.11.15-pre
->  v0.13.0-pre
    system
Node.js
$ nvm use v0.13.0-pre
$ node --v8-options | grep harmony
  --harmony_typeof (enable harmony semantics for typeof)
  --harmony_scoping (enable harmony block scoping)
  --harmony_modules (enable harmony modules (implies block scoping))
  --harmony_symbols (enable harmony symbols (a.k.a. private names))
  --harmony_proxies (enable harmony proxies)
  --harmony_collections (enable harmony collections (sets, maps))
  --harmony_generators (enable harmony generators)
  --harmony_iteration (enable harmony iteration (for-of))
  --harmony_numeric_literals (enable harmony numeric literals (0o77, 0b11))
  --harmony_strings (enable harmony string)
  --harmony_arrays (enable harmony arrays)
  --harmony_maths (enable harmony math functions)
  --harmony_promises ((dummy flag, has no effect))
  --harmony (enable all harmony features (except typeof))
io.js
$ nvm use v0.11.15-pre
$ node --v8-options | grep harmony
  --es_staging (enable all completed harmony features)
  --harmony (enable all completed harmony features)
  --harmony_scoping (enable "harmony block scoping" (in progress))
  --harmony_modules (enable "harmony modules (implies block scoping)" (in progress))
  --harmony_arrays (enable "harmony array methods" (in progress))
  --harmony_classes (enable "harmony classes (implies block scoping & object literal extension)" (in progress))
  --harmony_object_literals (enable "harmony object literal extensions" (in progress))
  --harmony_regexps (enable "harmony regular expression extensions" (in progress))
  --harmony_arrow_functions (enable "harmony arrow functions" (in progress))
  --harmony_tostring (enable "harmony toString" (in progress))
  --harmony_proxies (enable "harmony proxies" (in progress))
  --harmony_strings (enable "harmony string methods")

--harmony_classes --harmony_arrow_functionsオプションなどがio.jsの方がV8が新しいので入っていることがわかる。

見分けつかなくなるのでaliasはっておくのがよさそう

nvm alias iojs v0.11.15-pre
8
8
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
8