You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by he...@apache.org on 2014/05/19 19:39:00 UTC
[2/2] git commit: THRIFT-2522 TypeScript extension for Thrift Compiler
THRIFT-2522 TypeScript extension for Thrift Compiler
add info and format js/README.md
This closes #124
----
commit ada1016fdd6408694f9b82d5de8c1fbbf8d8a528
Author: Pascal Schweizer <pa...@hispeed.ch>
Date: 2014-03-21T16:18:59Z
THRIFT-2522 TypeScript extension for Thrift Compiler
----
Project: http://git-wip-us.apache.org/repos/asf/thrift/repo
Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/d0265c70
Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/d0265c70
Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/d0265c70
Branch: refs/heads/master
Commit: d0265c705271716c046dd33d14adf40464cdcea8
Parents: ada1016
Author: henrique <he...@apache.org>
Authored: Mon May 19 19:11:10 2014 +0200
Committer: henrique <he...@apache.org>
Committed: Mon May 19 19:31:09 2014 +0200
----------------------------------------------------------------------
compiler/cpp/src/generate/t_js_generator.cc | 2 +-
lib/js/README.md | 17 ++++++++++++++---
2 files changed, 15 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/thrift/blob/d0265c70/compiler/cpp/src/generate/t_js_generator.cc
----------------------------------------------------------------------
diff --git a/compiler/cpp/src/generate/t_js_generator.cc b/compiler/cpp/src/generate/t_js_generator.cc
index 7787dfb..7f53016 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")
http://git-wip-us.apache.org/repos/asf/thrift/blob/d0265c70/lib/js/README.md
----------------------------------------------------------------------
diff --git a/lib/js/README.md b/lib/js/README.md
index bb65050..8c4340b 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
+