THRIFT_REGISTER_GENERATOR(js, "Javascript",
" jquery: Generate jQuery compatible code.\n"
" node: Generate node.js compatible code.\n"
-" ts: Generate TypeScript Definition Files.\n")
+" ts: Generate TypeScript definition files.\n")
require a recent version of Node.js to be installed. To
install the support files for the Grunt build tool execute
the command:
- $ npm install
+
+ npm install
+
This reads the package.json and pulls in the appropriate
sources from the internet. To build the JavaScript branch
of Apache Thrift execute the command:
- $ grunt
-This runs the grunt build tool, linting all of the source
+
+ grunt
+
+This runs therunt build tool, linting all of the source
files, setting up and running the tests, concatenating and
minifying the main libraries and generating the html
documentation.
server.listen(port);
console.log("Http/Thrift Server running on port: " + port);
+
+TypeScript
+------------------------------------
+TypeScript definition files can also be generated by running:
+
+ thrift --gen js:ts file.thrift
+