2014-12-02 03:06:21 +01:00
|
|
|
io.js
|
2011-01-24 05:52:37 +01:00
|
|
|
===
|
2014-12-03 15:55:54 +01:00
|
|
|
[![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/iojs/io.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
2011-01-24 05:52:37 +01:00
|
|
|
|
2014-12-02 03:06:21 +01:00
|
|
|
This repository began as a GitHub fork of
|
2014-12-03 04:17:17 +01:00
|
|
|
[joyent/node](https://github.com/joyent/node).
|
|
|
|
io.js contributions, releases, and contributorship are under an
|
2014-12-02 03:06:21 +01:00
|
|
|
[open governance model](./CONTRIBUTING.md#governance).
|
2014-12-03 21:07:44 +01:00
|
|
|
We intend to land, with increasing regularity, releases which are
|
2014-12-03 00:08:25 +01:00
|
|
|
compatible with the npm ecosystem that has been built to date for node.js.
|
2014-12-02 03:06:21 +01:00
|
|
|
|
2011-08-27 00:04:47 +02:00
|
|
|
### To build:
|
|
|
|
|
2012-09-02 13:32:57 +02:00
|
|
|
Prerequisites (Unix only):
|
|
|
|
|
2014-12-03 18:11:18 +01:00
|
|
|
* `gcc` and `g++` 4.8 or newer, or
|
|
|
|
* `clang` and `clang++` 3.3 or newer
|
|
|
|
* Python 2.6 or 2.7
|
|
|
|
* GNU Make 3.81 or newer
|
|
|
|
* libexecinfo (FreeBSD and OpenBSD only)
|
2012-09-02 13:32:57 +02:00
|
|
|
|
|
|
|
Unix/Macintosh:
|
2011-01-24 05:52:37 +01:00
|
|
|
|
2014-03-31 21:06:03 +02:00
|
|
|
```sh
|
|
|
|
./configure
|
|
|
|
make
|
|
|
|
make install
|
|
|
|
```
|
2011-01-24 05:52:37 +01:00
|
|
|
|
2013-01-22 13:53:49 +01:00
|
|
|
If your python binary is in a non-standard location or has a
|
|
|
|
non-standard name, run the following instead:
|
|
|
|
|
2014-03-31 21:06:03 +02:00
|
|
|
```sh
|
|
|
|
export PYTHON=/path/to/python
|
|
|
|
$PYTHON ./configure
|
|
|
|
make
|
|
|
|
make install
|
|
|
|
```
|
2013-01-22 13:53:49 +01:00
|
|
|
|
2013-04-09 00:33:49 +02:00
|
|
|
Prerequisites (Windows only):
|
|
|
|
|
2014-12-03 18:11:18 +01:00
|
|
|
* Python 2.6 or 2.7
|
|
|
|
* Visual Studio 2013 for Windows Desktop, or
|
|
|
|
* Visual Studio Express 2013 for Windows Desktop
|
2013-04-09 00:33:49 +02:00
|
|
|
|
2011-08-27 00:04:47 +02:00
|
|
|
Windows:
|
|
|
|
|
build, i18n: improve Intl build, add "--with-intl"
The two main goals of this change are:
- To make it easier to build the Intl option using ICU (particularly,
using a newer ICU than v8/Chromium's version)
- To enable a much smaller ICU build with only English support The goal
here is to get node.js binaries built this way by default so that the
Intl API can be used. Additional data can be added at execution time
(see Readme and wiki)
More details are at https://github.com/joyent/node/pull/7719
In particular, this change adds the "--with-intl=" configure option to
provide more ways of building "Intl":
- "full-icu" picks up an ICU from deps/icu
- "small-icu" is similar, but builds only English
- "system-icu" uses pkg-config to find an installed ICU
- "none" does nothing (no Intl)
For Windows builds, the "full-icu" or "small-icu" options are added to
vcbuild.bat.
Note that the existing "--with-icu-path" option is not removed from
configure, but may not be used alongside the new option.
Wiki changes have already been made on
https://github.com/joyent/node/wiki/Installation
and a new page created at
https://github.com/joyent/node/wiki/Intl
(marked as provisional until this change lands.)
Summary of changes:
* README.md : doc updates
* .gitignore : added "deps/icu" as this is the location where ICU is
unpacked to.
* Makefile : added the tools/icu/* files to cpplint, but excluded a
problematic file.
* configure : added the "--with-intl" option mentioned above.
Calculate at config time the list of ICU source files to use and data
packaging options.
* node.gyp : add the new files src/node_i18n.cc/.h as well as ICU
linkage.
* src/node.cc : add call into
node::i18n::InitializeICUDirectory(icu_data_dir) as well as new
--icu-data-dir option and NODE_ICU_DATA env variable to configure ICU
data loading. This loading is only relevant in the "small"
configuration.
* src/node_i18n.cc : new source file for the above Initialize..
function, to setup ICU as needed.
* tools/icu : new directory with some tools needed for this build.
* tools/icu/icu-generic.gyp : new .gyp file that builds ICU in some new
ways, both on unix/mac and windows.
* tools/icu/icu-system.gyp : new .gyp file to build node against a
pkg-config detected ICU.
* tools/icu/icu_small.json : new config file for the "English-only" small
build.
* tools/icu/icutrim.py : new tool for trimming down ICU data. Reads the
above .json file.
* tools/icu/iculslocs.cc : new tool for repairing ICU data manifests
after trim operation.
* tools/icu/no-op.cc : dummy file to force .gyp into using a C++ linker.
* vcbuild.bat : added small-icu and full-icu options, to call into
configure.
* Fixed toolset dependencies, see
https://github.com/joyent/node/pull/7719#issuecomment-54641687
Note that because of a bug in gyp {CC,CXX}_host must also be set.
Otherwise gcc/g++ will be used by default for part of the build.
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Fedor Indutny <fedor@indutny.com>
2014-09-05 07:03:24 +02:00
|
|
|
```sh
|
|
|
|
vcbuild nosign
|
|
|
|
```
|
2011-08-27 00:04:47 +02:00
|
|
|
|
2013-10-01 08:35:24 +02:00
|
|
|
You can download pre-built binaries for various operating systems from
|
|
|
|
[http://nodejs.org/download/](http://nodejs.org/download/). The Windows
|
2014-09-25 05:19:22 +02:00
|
|
|
and OS X installers will prompt you for the location in which to install.
|
2013-10-01 08:35:24 +02:00
|
|
|
The tarballs are self-contained; you can extract them to a local directory
|
|
|
|
with:
|
|
|
|
|
2014-03-31 21:06:03 +02:00
|
|
|
```sh
|
|
|
|
tar xzf /path/to/node-<version>-<platform>-<arch>.tar.gz
|
|
|
|
```
|
2013-10-01 08:35:24 +02:00
|
|
|
|
|
|
|
Or system-wide with:
|
|
|
|
|
2014-03-31 21:06:03 +02:00
|
|
|
```sh
|
|
|
|
cd /usr/local && tar --strip-components 1 -xzf \
|
|
|
|
/path/to/node-<version>-<platform>-<arch>.tar.gz
|
|
|
|
```
|
2013-10-01 08:35:24 +02:00
|
|
|
|
2011-08-27 00:04:47 +02:00
|
|
|
### To run the tests:
|
|
|
|
|
|
|
|
Unix/Macintosh:
|
2011-01-24 05:52:37 +01:00
|
|
|
|
2014-03-31 21:06:03 +02:00
|
|
|
```sh
|
|
|
|
make test
|
|
|
|
```
|
2011-01-24 05:52:37 +01:00
|
|
|
|
2011-08-27 00:04:47 +02:00
|
|
|
Windows:
|
|
|
|
|
2014-03-31 21:06:03 +02:00
|
|
|
```sh
|
|
|
|
vcbuild test
|
|
|
|
```
|
2011-08-27 00:04:47 +02:00
|
|
|
|
|
|
|
### To build the documentation:
|
2011-01-24 05:52:37 +01:00
|
|
|
|
2014-03-31 21:06:03 +02:00
|
|
|
```sh
|
|
|
|
make doc
|
|
|
|
```
|
2011-01-24 05:52:37 +01:00
|
|
|
|
2011-08-27 00:04:47 +02:00
|
|
|
### To read the documentation:
|
2011-01-24 05:52:37 +01:00
|
|
|
|
2014-03-31 21:06:03 +02:00
|
|
|
```sh
|
|
|
|
man doc/node.1
|
|
|
|
```
|
2011-01-24 05:52:37 +01:00
|
|
|
|
build, i18n: improve Intl build, add "--with-intl"
The two main goals of this change are:
- To make it easier to build the Intl option using ICU (particularly,
using a newer ICU than v8/Chromium's version)
- To enable a much smaller ICU build with only English support The goal
here is to get node.js binaries built this way by default so that the
Intl API can be used. Additional data can be added at execution time
(see Readme and wiki)
More details are at https://github.com/joyent/node/pull/7719
In particular, this change adds the "--with-intl=" configure option to
provide more ways of building "Intl":
- "full-icu" picks up an ICU from deps/icu
- "small-icu" is similar, but builds only English
- "system-icu" uses pkg-config to find an installed ICU
- "none" does nothing (no Intl)
For Windows builds, the "full-icu" or "small-icu" options are added to
vcbuild.bat.
Note that the existing "--with-icu-path" option is not removed from
configure, but may not be used alongside the new option.
Wiki changes have already been made on
https://github.com/joyent/node/wiki/Installation
and a new page created at
https://github.com/joyent/node/wiki/Intl
(marked as provisional until this change lands.)
Summary of changes:
* README.md : doc updates
* .gitignore : added "deps/icu" as this is the location where ICU is
unpacked to.
* Makefile : added the tools/icu/* files to cpplint, but excluded a
problematic file.
* configure : added the "--with-intl" option mentioned above.
Calculate at config time the list of ICU source files to use and data
packaging options.
* node.gyp : add the new files src/node_i18n.cc/.h as well as ICU
linkage.
* src/node.cc : add call into
node::i18n::InitializeICUDirectory(icu_data_dir) as well as new
--icu-data-dir option and NODE_ICU_DATA env variable to configure ICU
data loading. This loading is only relevant in the "small"
configuration.
* src/node_i18n.cc : new source file for the above Initialize..
function, to setup ICU as needed.
* tools/icu : new directory with some tools needed for this build.
* tools/icu/icu-generic.gyp : new .gyp file that builds ICU in some new
ways, both on unix/mac and windows.
* tools/icu/icu-system.gyp : new .gyp file to build node against a
pkg-config detected ICU.
* tools/icu/icu_small.json : new config file for the "English-only" small
build.
* tools/icu/icutrim.py : new tool for trimming down ICU data. Reads the
above .json file.
* tools/icu/iculslocs.cc : new tool for repairing ICU data manifests
after trim operation.
* tools/icu/no-op.cc : dummy file to force .gyp into using a C++ linker.
* vcbuild.bat : added small-icu and full-icu options, to call into
configure.
* Fixed toolset dependencies, see
https://github.com/joyent/node/pull/7719#issuecomment-54641687
Note that because of a bug in gyp {CC,CXX}_host must also be set.
Otherwise gcc/g++ will be used by default for part of the build.
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Fedor Indutny <fedor@indutny.com>
2014-09-05 07:03:24 +02:00
|
|
|
### To build `Intl` (ECMA-402) support:
|
|
|
|
|
|
|
|
*Note:* more docs, including how to reduce disk footprint, are on
|
|
|
|
[the wiki](https://github.com/joyent/node/wiki/Intl).
|
|
|
|
|
|
|
|
#### Use existing installed ICU (Unix/Macintosh only):
|
|
|
|
|
|
|
|
```sh
|
|
|
|
pkg-config --modversion icu-i18n && ./configure --with-intl=system-icu
|
|
|
|
```
|
|
|
|
|
|
|
|
#### Build ICU from source:
|
|
|
|
|
|
|
|
First: Unpack latest ICU
|
|
|
|
[icu4c-**##.#**-src.tgz](http://icu-project.org/download) (or `.zip`)
|
|
|
|
as `deps/icu` (You'll have: `deps/icu/source/...`)
|
|
|
|
|
|
|
|
Unix/Macintosh:
|
|
|
|
|
|
|
|
```sh
|
|
|
|
./configure --with-intl=full-icu
|
|
|
|
```
|
|
|
|
|
|
|
|
Windows:
|
|
|
|
|
|
|
|
```sh
|
|
|
|
vcbuild full-icu
|
|
|
|
```
|
|
|
|
|
2011-01-24 05:52:37 +01:00
|
|
|
Resources for Newcomers
|
|
|
|
---
|
2011-11-01 20:52:35 +01:00
|
|
|
- [The Wiki](https://github.com/joyent/node/wiki)
|
2011-01-24 05:52:37 +01:00
|
|
|
- [nodejs.org](http://nodejs.org/)
|
2013-09-13 14:46:06 +02:00
|
|
|
- [how to install node.js and npm (node package manager)](http://www.joyent.com/blog/installing-node-and-npm/)
|
2011-11-01 20:52:35 +01:00
|
|
|
- [list of modules](https://github.com/joyent/node/wiki/modules)
|
2013-05-10 00:15:39 +02:00
|
|
|
- [searching the npm registry](http://npmjs.org/)
|
2011-11-01 20:52:35 +01:00
|
|
|
- [list of companies and projects using node](https://github.com/joyent/node/wiki/Projects,-Applications,-and-Companies-Using-Node)
|
2011-01-24 05:52:37 +01:00
|
|
|
- [node.js mailing list](http://groups.google.com/group/nodejs)
|
2014-12-03 02:10:55 +01:00
|
|
|
- irc chatroom, [#io.js on freenode.net](http://webchat.freenode.net?channels=io.js&uio=d4)
|
2011-11-01 20:52:35 +01:00
|
|
|
- [community](https://github.com/joyent/node/wiki/Community)
|
|
|
|
- [contributing](https://github.com/joyent/node/wiki/Contributing)
|
|
|
|
- [big list of all the helpful wiki pages](https://github.com/joyent/node/wiki/_pages)
|