$ cat > myapp.jsx
import "nodejs/*.jsx";
class _Main {
static main(args : string[]) : void {
log "hello node.js!";
}
}
^D
$ jsx --include-path <path-of-nodejs.jsx>/lib myapp.jsx
Please feel free to contact Kazuho if you are still not sure how you should add bindings after reading the rules below.
- file layout should be the same as node.js
- e.g. definitions in the
fsmodule should be bound tonodejs/fs.jsx
- e.g. definitions in the
- preloaded globals should go into
nodejs.jsx- e.g. the
processandmoduleobjects
- e.g. the
- inheritance at the binding level should reflect those of the node.js implementation
-- e.g.
stream.Writableis a sub-class ofstream.Readable(notstream.Writable)