Skip to content

Commit

Permalink
Add support to generate nodejs output. (#51)
Browse files Browse the repository at this point in the history
* Add support to generate nodejs output.

Currently the commonjs import_style seems to be working a lot better than the
closure style, at least when using grpc.

* Remove stray unused env var.

* include node in test.sh
  • Loading branch information
sundbp authored and mdkess committed Mar 22, 2018
1 parent 286f44f commit e2dcfde
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion all/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ printUsage() {
}

GEN_GATEWAY=false
SUPPORTED_LANGUAGES=("go" "ruby" "csharp" "java" "python" "objc")
SUPPORTED_LANGUAGES=("go" "ruby" "csharp" "java" "python" "objc" "node")
EXTRA_INCLUDES=""
OUT_DIR=""

Expand Down Expand Up @@ -143,6 +143,9 @@ case $GEN_LANG in
"java")
GEN_STRING="--grpc_out=$OUT_DIR --${GEN_LANG}_out=$OUT_DIR --plugin=protoc-gen-grpc=`which protoc-gen-grpc-java`"
;;
"node")
GEN_STRING="--grpc_out=$OUT_DIR --js_out=import_style=commonjs,binary:$OUT_DIR --plugin=protoc-gen-grpc=`which grpc_${PLUGIN_LANG}_plugin`"
;;
*)
GEN_STRING="--grpc_out=$OUT_DIR --${GEN_LANG}_out=$OUT_DIR --plugin=protoc-gen-grpc=`which grpc_${PLUGIN_LANG}_plugin`"
;;
Expand Down
2 changes: 1 addition & 1 deletion all/test.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

LANGS=("go" "ruby" "csharp" "java" "python" "objc")
LANGS=("go" "ruby" "csharp" "java" "python" "objc" "node")

CONTAINER=$1

Expand Down

0 comments on commit e2dcfde

Please sign in to comment.