-
Notifications
You must be signed in to change notification settings - Fork 651
Developer Notes
Current status (2017-Aug-04): http2
, behind the flag --expose-http2
, is expected to be released in Node 8.4 at the earliest.
When http2
is introduced in the codebase, one will need to use Node built from nodejs/node:master or nodejs/http2:initial-pr.
Until http2
is released in Node, for development purposes it might be useful to build Node with http2
exposed by default. To do so, simply search for bool config_expose_http2 = false;
in src/node.cc
and set the value to true
.
A lot of command-line interactions with the codebase should be done through gulp
tasks. Here's a list of what can be done:
-
gulp compile
transpilessrc
. -
gulp test.compile
transpilessrc
andtest
. -
gulp test
runsgulp test.compile
, and then runs all tests. -
gulp test.single --file $FILE
transpilessrc
and$FILE
, and runs only the transpiled$FILE
. (See also: #5) -
gulp clean
deletes transpiled code. -
gulp lint
lintssrc
andtest
.
We are not required to support to Node <6, the earliest Node version to which http2
may be back-ported. For this reason we should strongly consider using es6
as our target transpiliation language.
async
/await
should not be used in src/
due to performance considerations (as far as I know). It should be OK to use them in tests; Mocha supports Promises out-of-the-box.