From: henrique Date: Mon, 19 May 2014 17:11:10 +0000 (+0200) Subject: THRIFT-2522 TypeScript extension for Thrift Compiler X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=d0265c705271716c046dd33d14adf40464cdcea8;p=common%2Fthrift.git THRIFT-2522 TypeScript extension for Thrift Compiler add info and format js/README.md This closes #124 ---- commit ada1016fdd6408694f9b82d5de8c1fbbf8d8a528 Author: Pascal Schweizer Date: 2014-03-21T16:18:59Z THRIFT-2522 TypeScript extension for Thrift Compiler ---- --- diff --git a/compiler/cpp/src/generate/t_js_generator.cc b/compiler/cpp/src/generate/t_js_generator.cc index 7787dfb4..7f530166 100644 --- a/compiler/cpp/src/generate/t_js_generator.cc +++ b/compiler/cpp/src/generate/t_js_generator.cc @@ -2185,4 +2185,4 @@ std::string t_js_generator::ts_function_signature(t_function* tfunction, bool in 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") diff --git a/lib/js/README.md b/lib/js/README.md index bb650503..8c4340b5 100644 --- a/lib/js/README.md +++ b/lib/js/README.md @@ -31,12 +31,16 @@ package.json. Many of the build and test tools used here 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. @@ -127,3 +131,10 @@ service. 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 +