From ea18f09f45b81c53170a3acff1d62299726c2fe2 Mon Sep 17 00:00:00 2001 From: AJ Date: Wed, 4 Sep 2024 12:55:16 -0400 Subject: [PATCH] feat: move the $ shell line indicator to scss --- assets/scss/_grpc.scss | 13 +++++++++ content/en/docs/languages/cpp/basics.md | 8 +++--- content/en/docs/languages/cpp/quickstart.md | 28 +++++++++---------- content/en/docs/languages/dart/quickstart.md | 18 ++++++------ content/en/docs/languages/go/basics.md | 8 +++--- content/en/docs/languages/go/quickstart.md | 18 ++++++------ content/en/docs/languages/java/quickstart.md | 16 +++++------ content/en/docs/languages/kotlin/basics.md | 10 +++---- .../en/docs/languages/kotlin/quickstart.md | 16 +++++------ content/en/docs/languages/node/quickstart.md | 8 +++--- .../docs/languages/objective-c/quickstart.md | 10 +++---- content/en/docs/languages/php/quickstart.md | 14 +++++----- .../en/docs/languages/python/quickstart.md | 8 +++--- content/en/docs/languages/ruby/quickstart.md | 8 +++--- .../docs/platforms/android/java/quickstart.md | 18 ++++++------ .../platforms/android/kotlin/quickstart.md | 18 ++++++------ content/en/docs/platforms/web/quickstart.md | 8 +++--- content/en/docs/protoc-installation.md | 16 +++++------ 18 files changed, 128 insertions(+), 115 deletions(-) diff --git a/assets/scss/_grpc.scss b/assets/scss/_grpc.scss index 08745360a95..7c4ece86e5a 100644 --- a/assets/scss/_grpc.scss +++ b/assets/scss/_grpc.scss @@ -154,6 +154,19 @@ body:not(.td-blog) .td-content:not(.list-page) { } } +// Render the bash $ prefix indicator to enable easier copy of cli commands +.td-content div.highlight pre { + padding-left: 0.5rem; + code.language-sh:before { + content: "$"; + margin-left: 0.5rem; + } + code.language-sh span { + display: inline !important; + margin-left: 0.25rem; + } +} + /* The following contains some styles in use on the top-level pages (About, Community...). Bootstrap provides many responsive utilities diff --git a/content/en/docs/languages/cpp/basics.md b/content/en/docs/languages/cpp/basics.md index 44faa602135..9ba709a961c 100644 --- a/content/en/docs/languages/cpp/basics.md +++ b/content/en/docs/languages/cpp/basics.md @@ -36,14 +36,14 @@ Get the example code and build gRPC: 2. From the repo folder, change to the route guide example directory: ```sh - $ cd examples/cpp/route_guide + cd examples/cpp/route_guide ``` 3. Run `cmake` ```sh - $ mkdir -p cmake/build - $ cd cmake/build - $ cmake -DCMAKE_PREFIX_PATH=$MY_INSTALL_DIR ../.. + mkdir -p cmake/build + cd cmake/build + cmake -DCMAKE_PREFIX_PATH=$MY_INSTALL_DIR ../.. ``` ### Defining the service diff --git a/content/en/docs/languages/cpp/quickstart.md b/content/en/docs/languages/cpp/quickstart.md index d7bea5761bb..ab76545e1c0 100644 --- a/content/en/docs/languages/cpp/quickstart.md +++ b/content/en/docs/languages/cpp/quickstart.md @@ -47,13 +47,13 @@ following these instructions: - Linux ```sh - $ sudo apt install -y cmake + sudo apt install -y cmake ``` - macOS: ```sh - $ brew install cmake + brew install cmake ``` - For general `cmake` installation instructions, see [Installing CMake][]. @@ -82,13 +82,13 @@ Install the basic tools required to build gRPC: - Linux ```sh - $ sudo apt install -y build-essential autoconf libtool pkg-config + sudo apt install -y build-essential autoconf libtool pkg-config ``` - macOS: ```sh - $ brew install autoconf automake libtool pkg-config + brew install autoconf automake libtool pkg-config ``` #### Clone the `grpc` repo @@ -140,16 +140,16 @@ the steps of the previous section. 1. Change to the example's directory: ```sh - $ cd examples/cpp/helloworld + cd examples/cpp/helloworld ``` 2. Build the example using `cmake`: ```sh - $ mkdir -p cmake/build - $ pushd cmake/build - $ cmake -DCMAKE_PREFIX_PATH=$MY_INSTALL_DIR ../.. - $ make -j 4 + mkdir -p cmake/build + pushd cmake/build + cmake -DCMAKE_PREFIX_PATH=$MY_INSTALL_DIR ../.. + make -j 4 ``` {{% alert title="Note" color="info" %}} @@ -166,13 +166,13 @@ Run the example from the example **build** directory 1. Run the server: ```sh - $ ./greeter_server + ./greeter_server ``` 1. From a different terminal, run the client and see the client output: ```sh - $ ./greeter_client + ./greeter_client Greeter received: Hello world ``` @@ -330,19 +330,19 @@ from the example **build** directory `examples/cpp/helloworld/cmake/build`: 1. Build the client and server after having made changes: ```sh - $ make -j 4 + make -j 4 ``` 2. Run the server: ```sh - $ ./greeter_server + ./greeter_server ``` 3. On a different terminal, run the client: ```sh - $ ./greeter_client + ./greeter_client ``` You'll see the following output: diff --git a/content/en/docs/languages/dart/quickstart.md b/content/en/docs/languages/dart/quickstart.md index 5482a94dc64..cc00eb4bb64 100644 --- a/content/en/docs/languages/dart/quickstart.md +++ b/content/en/docs/languages/dart/quickstart.md @@ -22,13 +22,13 @@ spelling: cSpell:ignore Iprotos the following command: ```sh - $ dart pub global activate protoc_plugin + dart pub global activate protoc_plugin ``` 2. Update your `PATH` so that the `protoc` compiler can find the plugin: ```sh - $ export PATH="$PATH:$HOME/.pub-cache/bin" + export PATH="$PATH:$HOME/.pub-cache/bin" ``` {{% alert title="Note" color="info" %}} @@ -43,13 +43,13 @@ The example code is part of the [grpc-dart][] repo. the repo: ```sh - $ git clone https://github.com/grpc/grpc-dart + git clone https://github.com/grpc/grpc-dart ``` 2. Change to the quick start example directory: ```sh - $ cd grpc-dart/example/helloworld + cd grpc-dart/example/helloworld ``` ### Run the example @@ -59,19 +59,19 @@ From the `example/helloworld` directory: 1. Download package dependencies: ```sh - $ dart pub get + dart pub get ``` 2. Run the server: ```sh - $ dart bin/server.dart + dart bin/server.dart ``` 3. From another terminal, run the client: ```sh - $ dart bin/client.dart + dart bin/client.dart Greeter client received: Hello, world! ``` @@ -200,14 +200,14 @@ from the `example/helloworld` directory: 1. Run the server: ```sh - $ dart bin/server.dart + dart bin/server.dart ``` 2. From another terminal, run the client. This time, add a name as a command-line argument: ```sh - $ dart bin/client.dart Alice + dart bin/client.dart Alice ``` You'll see the following output: diff --git a/content/en/docs/languages/go/basics.md b/content/en/docs/languages/go/basics.md index 45a8f781c35..090ba741968 100644 --- a/content/en/docs/languages/go/basics.md +++ b/content/en/docs/languages/go/basics.md @@ -40,13 +40,13 @@ The example code is part of the [grpc-go][] repo. the repo: ```sh - $ git clone -b {{< param grpc_vers.go >}} --depth 1 https://github.com/grpc/grpc-go + git clone -b {{< param grpc_vers.go >}} --depth 1 https://github.com/grpc/grpc-go ``` 2. Change to the example directory: ```sh - $ cd grpc-go/examples/route_guide + cd grpc-go/examples/route_guide ``` ### Defining the service @@ -566,13 +566,13 @@ Execute the following commands from the `examples/route_guide` directory: 1. Run the server: ```sh - $ go run server/server.go + go run server/server.go ``` 2. From another terminal, run the client: ```sh - $ go run client/client.go + go run client/client.go ``` You'll see output like this: diff --git a/content/en/docs/languages/go/quickstart.md b/content/en/docs/languages/go/quickstart.md index 854edf6cba3..a847bd290e8 100644 --- a/content/en/docs/languages/go/quickstart.md +++ b/content/en/docs/languages/go/quickstart.md @@ -21,14 +21,14 @@ spelling: cSpell:ignore Fatalf GOPATH 1. Install the protocol compiler plugins for Go using the following commands: ```sh - $ go install google.golang.org/protobuf/cmd/protoc-gen-go@latest - $ go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest + go install google.golang.org/protobuf/cmd/protoc-gen-go@latest + go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest ``` 2. Update your `PATH` so that the `protoc` compiler can find the plugins: ```sh - $ export PATH="$PATH:$(go env GOPATH)/bin" + export PATH="$PATH:$(go env GOPATH)/bin" ``` ### Get the example code @@ -39,13 +39,13 @@ The example code is part of the [grpc-go][] repo. the repo: ```sh - $ git clone -b {{< param grpc_vers.go >}} --depth 1 https://github.com/grpc/grpc-go + git clone -b {{< param grpc_vers.go >}} --depth 1 https://github.com/grpc/grpc-go ``` 2. Change to the quick start example directory: ```sh - $ cd grpc-go/examples/helloworld + cd grpc-go/examples/helloworld ``` ### Run the example @@ -55,14 +55,14 @@ From the `examples/helloworld` directory: 1. Compile and execute the server code: ```sh - $ go run greeter_server/main.go + go run greeter_server/main.go ``` 2. From a different terminal, compile and execute the client code to see the client output: ```sh - $ go run greeter_client/main.go + go run greeter_client/main.go Greeting: Hello world ``` @@ -178,14 +178,14 @@ from the `examples/helloworld` directory: 1. Run the server: ```sh - $ go run greeter_server/main.go + go run greeter_server/main.go ``` 2. From another terminal, run the client. This time, add a name as a command-line argument: ```sh - $ go run greeter_client/main.go --name=Alice + go run greeter_client/main.go --name=Alice ``` You'll see the following output: diff --git a/content/en/docs/languages/java/quickstart.md b/content/en/docs/languages/java/quickstart.md index d2585e7c42a..ac0ddb7c938 100644 --- a/content/en/docs/languages/java/quickstart.md +++ b/content/en/docs/languages/java/quickstart.md @@ -16,13 +16,13 @@ The example code is part of the [grpc-java][] repo. the repo: ```sh - $ git clone -b {{< param grpc_vers.java >}} --depth 1 https://github.com/grpc/grpc-java + git clone -b {{< param grpc_vers.java >}} --depth 1 https://github.com/grpc/grpc-java ``` 2. Change to the examples directory: ```sh - $ cd grpc-java/examples + cd grpc-java/examples ``` ### Run the example @@ -32,20 +32,20 @@ From the `examples` directory: 1. Compile the client and server ```sh - $ ./gradlew installDist + ./gradlew installDist ``` 2. Run the server: ```sh - $ ./build/install/examples/bin/hello-world-server + ./build/install/examples/bin/hello-world-server INFO: Server started, listening on 50051 ``` 3. From another terminal, run the client: ```sh - $ ./build/install/examples/bin/hello-world-client + ./build/install/examples/bin/hello-world-client INFO: Will try to greet world ... INFO: Greeting: Hello world ``` @@ -206,20 +206,20 @@ from the `examples` directory: 1. Compile the client and server: ```sh - $ ./gradlew installDist + ./gradlew installDist ``` 2. Run the server: ```sh - $ ./build/install/examples/bin/hello-world-server + ./build/install/examples/bin/hello-world-server INFO: Server started, listening on 50051 ``` 3. From another terminal, run the client: ```sh - $ ./build/install/examples/bin/hello-world-client + ./build/install/examples/bin/hello-world-client INFO: Will try to greet world ... INFO: Greeting: Hello world INFO: Greeting: Hello again world diff --git a/content/en/docs/languages/kotlin/basics.md b/content/en/docs/languages/kotlin/basics.md index 49e4a0c198c..bbf2e511b68 100644 --- a/content/en/docs/languages/kotlin/basics.md +++ b/content/en/docs/languages/kotlin/basics.md @@ -34,13 +34,13 @@ The example code is part of the [grpc-kotlin][] repo. the repo: ```sh - $ git clone --depth 1 https://github.com/grpc/grpc-kotlin + git clone --depth 1 https://github.com/grpc/grpc-kotlin ``` 2. Change to the examples directory: ```sh - $ cd grpc-kotlin/examples + cd grpc-kotlin/examples ``` ### Defining the service @@ -474,20 +474,20 @@ Run the following commands from the `grpc-kotlin/examples` directory: 1. Compile the client and server ```sh - $ ./gradlew installDist + ./gradlew installDist ``` 2. Run the server: ```sh - $ ./server/build/install/server/bin/route-guide-server + ./server/build/install/server/bin/route-guide-server Server started, listening on 8980 ``` 3. From another terminal, run the client: ```sh - $ ./client/build/install/client/bin/route-guide-client + ./client/build/install/client/bin/route-guide-client ``` You'll see client output like this: diff --git a/content/en/docs/languages/kotlin/quickstart.md b/content/en/docs/languages/kotlin/quickstart.md index 39b1260e401..d30b7c4bf1f 100644 --- a/content/en/docs/languages/kotlin/quickstart.md +++ b/content/en/docs/languages/kotlin/quickstart.md @@ -18,13 +18,13 @@ The example code is part of the [grpc-kotlin][] repo. the repo: ```sh - $ git clone --depth 1 https://github.com/grpc/grpc-kotlin + git clone --depth 1 https://github.com/grpc/grpc-kotlin ``` 2. Change to the examples directory: ```sh - $ cd grpc-kotlin/examples + cd grpc-kotlin/examples ``` ### Run the example @@ -34,20 +34,20 @@ From the `examples` directory: 1. Compile the client and server ```sh - $ ./gradlew installDist + ./gradlew installDist ``` 2. Run the server: ```sh - $ ./server/build/install/server/bin/hello-world-server + ./server/build/install/server/bin/hello-world-server Server started, listening on 50051 ``` 3. From another terminal, run the client: ```sh - $ ./client/build/install/client/bin/hello-world-client + ./client/build/install/client/bin/hello-world-client Received: Hello world ``` @@ -169,13 +169,13 @@ from the `examples` directory: 1. Compile the client and server: ```sh - $ ./gradlew installDist + ./gradlew installDist ``` 2. Run the server: ```sh - $ ./server/build/install/server/bin/hello-world-server + ./server/build/install/server/bin/hello-world-server Server started, listening on 50051 ``` @@ -183,7 +183,7 @@ from the `examples` directory: command-line argument: ```sh - $ ./client/build/install/client/bin/hello-world-client Alice + ./client/build/install/client/bin/hello-world-client Alice Received: Hello Alice Received: Hello again Alice ``` diff --git a/content/en/docs/languages/node/quickstart.md b/content/en/docs/languages/node/quickstart.md index 53a44706ebe..8c47af337df 100644 --- a/content/en/docs/languages/node/quickstart.md +++ b/content/en/docs/languages/node/quickstart.md @@ -34,13 +34,13 @@ From the `examples/helloworld/dynamic_codegen` directory: 1. Run the server: ```sh - $ node greeter_server.js + node greeter_server.js ``` 2. From another terminal, run the client: ```sh - $ node greeter_client.js + node greeter_client.js ``` Congratulations! You've just run a client-server application with gRPC. @@ -153,13 +153,13 @@ Just like we did before, from the `examples/helloworld/dynamic_codegen` director 1. Run the server: ```sh - $ node greeter_server.js + node greeter_server.js ``` 2. From another terminal, run the client: ```sh - $ node greeter_client.js + node greeter_client.js ``` ### What's next diff --git a/content/en/docs/languages/objective-c/quickstart.md b/content/en/docs/languages/objective-c/quickstart.md index 7066119bd32..907c116f803 100644 --- a/content/en/docs/languages/objective-c/quickstart.md +++ b/content/en/docs/languages/objective-c/quickstart.md @@ -18,7 +18,7 @@ weight: 10 Check the status and version of CocoaPods on your system: ```sh - $ pod --version + pod --version ``` If CocoaPods is not installed, follow the [CocoaPods install @@ -32,7 +32,7 @@ weight: 10 Make sure the command line developer tools are installed: ```sh - $ xcode-select --install + xcode-select --install ``` - [Homebrew](https://brew.sh/) @@ -40,7 +40,7 @@ weight: 10 - `autoconf`, `automake`, `libtool`, `pkg-config` ```sh - $ brew install autoconf automake libtool pkg-config + brew install autoconf automake libtool pkg-config ``` ### Download the example @@ -267,8 +267,8 @@ When installing CocoaPods, error `activesupport requires Ruby version >= 2.2.2` : Install an older version of `activesupport`, then install CocoaPods: ```sh - $ [sudo] gem install activesupport -v 4.2.6 - $ [sudo] gem install cocoapods + [sudo] gem install activesupport -v 4.2.6 + [sudo] gem install cocoapods ``` When installing dependencies with CocoaPods, error `Unable to find a specification for !ProtoCompiler-gRPCPlugin` diff --git a/content/en/docs/languages/php/quickstart.md b/content/en/docs/languages/php/quickstart.md index 31ee47045d6..03cd53932ca 100644 --- a/content/en/docs/languages/php/quickstart.md +++ b/content/en/docs/languages/php/quickstart.md @@ -23,20 +23,20 @@ The example code is part of the [grpc][] repo. 1. Clone the [grpc][] repo and its submodules: ```sh - $ git clone --recurse-submodules -b {{< param grpc_vers.core >}} --depth 1 --shallow-submodules https://github.com/grpc/grpc + git clone --recurse-submodules -b {{< param grpc_vers.core >}} --depth 1 --shallow-submodules https://github.com/grpc/grpc ``` 2. Change to the quick start example directory: ```sh - $ cd grpc/examples/php + cd grpc/examples/php ``` 3. Install the `grpc` composer package: ```sh - $ ./greeter_proto_gen.sh - $ composer install + ./greeter_proto_gen.sh + composer install ``` ### Run the example @@ -47,7 +47,7 @@ The example code is part of the [grpc][] repo. 2. From the `examples/php` directory, run the PHP client: ```sh - $ ./run_greeter_client.sh + ./run_greeter_client.sh ``` Congratulations! You've just run a client-server application with gRPC. @@ -180,14 +180,14 @@ Just like we did before, from the `grpc-node/examples/helloworld/dynamic_codegen 1. Run the server: ```sh - $ node greeter_server.js + node greeter_server.js ``` 2. From another terminal, from the `examples/php` directory, run the client: ```sh - $ ./run_greeter_client.sh + ./run_greeter_client.sh ``` ### What's next diff --git a/content/en/docs/languages/python/quickstart.md b/content/en/docs/languages/python/quickstart.md index 90cc355c622..2f7e529e54e 100644 --- a/content/en/docs/languages/python/quickstart.md +++ b/content/en/docs/languages/python/quickstart.md @@ -77,13 +77,13 @@ From the `examples/python/helloworld` directory: 1. Run the server: ```sh - $ python greeter_server.py + python greeter_server.py ``` 2. From another terminal, run the client: ```sh - $ python greeter_client.py + python greeter_client.py ``` Congratulations! You've just run a client-server application with gRPC. @@ -200,13 +200,13 @@ Just like we did before, from the `examples/python/helloworld` directory: 1. Run the server: ```sh - $ python greeter_server.py + python greeter_server.py ``` 2. From another terminal, run the client: ```sh - $ python greeter_client.py + python greeter_client.py ``` ### What's next diff --git a/content/en/docs/languages/ruby/quickstart.md b/content/en/docs/languages/ruby/quickstart.md index 0e171f12cac..721191e6876 100644 --- a/content/en/docs/languages/ruby/quickstart.md +++ b/content/en/docs/languages/ruby/quickstart.md @@ -53,13 +53,13 @@ From the `examples/ruby` directory: 1. Run the server: ```sh - $ ruby greeter_server.rb + ruby greeter_server.rb ``` 2. From another terminal, run the client: ```sh - $ ruby greeter_client.rb + ruby greeter_client.rb ``` Congratulations! You've just run a client-server application with gRPC. @@ -170,13 +170,13 @@ Just like we did before, from the `examples/ruby` directory: 1. Run the server: ```sh - $ ruby greeter_server.rb + ruby greeter_server.rb ``` 2. From another terminal, run the client: ```sh - $ ruby greeter_client.rb + ruby greeter_client.rb ``` ### What's next diff --git a/content/en/docs/platforms/android/java/quickstart.md b/content/en/docs/platforms/android/java/quickstart.md index 8cb08041a42..2d5301dd587 100644 --- a/content/en/docs/platforms/android/java/quickstart.md +++ b/content/en/docs/platforms/android/java/quickstart.md @@ -18,7 +18,7 @@ weight: 10 the following environment variable: ```sh - $ export ANDROID_SDK_ROOT="" + export ANDROID_SDK_ROOT="" ``` - An android device set up for [USB debugging][] or an @@ -38,13 +38,13 @@ The example code is part of the [grpc-java][] repo. the repo: ```sh - $ git clone -b {{< param grpc_vers.java >}} https://github.com/grpc/grpc-java + git clone -b {{< param grpc_vers.java >}} https://github.com/grpc/grpc-java ``` 2. Change to the examples directory: ```sh - $ cd grpc-java/examples + cd grpc-java/examples ``` ### Run the example @@ -52,20 +52,20 @@ The example code is part of the [grpc-java][] repo. 1. Compile the server: ```sh - $ ./gradlew installDist + ./gradlew installDist ``` 2. Run the server: ```sh - $ ./build/install/examples/bin/hello-world-server + ./build/install/examples/bin/hello-world-server INFO: Server started, listening on 50051 ``` 3. From another terminal, build the client and install it on your device: ```sh - $ (cd android/helloworld; ../../gradlew installDebug) + (cd android/helloworld; ../../gradlew installDebug) ``` 4. Launch the client app from your device. @@ -190,20 +190,20 @@ from the `examples` directory: 1. Compile the server: ```sh - $ ./gradlew installDist + ./gradlew installDist ``` 2. Run the server: ```sh - $ ./build/install/examples/bin/hello-world-server + ./build/install/examples/bin/hello-world-server INFO: Server started, listening on 50051 ``` 3. From another terminal, build the client and install it on your device: ```sh - $ (cd android/helloworld; ../../gradlew installDebug) + (cd android/helloworld; ../../gradlew installDebug) ``` 4. Launch the client app from your device. diff --git a/content/en/docs/platforms/android/kotlin/quickstart.md b/content/en/docs/platforms/android/kotlin/quickstart.md index c0dc9b64ba5..143daf08606 100644 --- a/content/en/docs/platforms/android/kotlin/quickstart.md +++ b/content/en/docs/platforms/android/kotlin/quickstart.md @@ -19,7 +19,7 @@ weight: 10 the following environment variable: ```sh - $ export ANDROID_SDK_ROOT="" + export ANDROID_SDK_ROOT="" ``` - An android device set up for [USB debugging][] or an @@ -39,13 +39,13 @@ The example code is part of the [grpc-kotlin][] repo. the repo: ```sh - $ git clone https://github.com/grpc/grpc-kotlin + git clone https://github.com/grpc/grpc-kotlin ``` 2. Change to the examples directory: ```sh - $ cd grpc-kotlin/examples + cd grpc-kotlin/examples ``` ### Run the example @@ -53,20 +53,20 @@ The example code is part of the [grpc-kotlin][] repo. 1. Compile the server: ```sh - $ ./gradlew installDist + ./gradlew installDist ``` 2. Run the server: ```sh - $ ./server/build/install/server/bin/hello-world-server + ./server/build/install/server/bin/hello-world-server Server started, listening on 50051 ``` 3. From another terminal, build the client and install it on your device: ```sh - $ ./gradlew :android:installDebug + ./gradlew :android:installDebug ``` 4. Launch the client app from your device. @@ -182,20 +182,20 @@ from the `examples` directory: 1. Compile the server: ```sh - $ ./gradlew installDist + ./gradlew installDist ``` 2. Run the server: ```sh - $ ./server/build/install/server/bin/hello-world-server + ./server/build/install/server/bin/hello-world-server Server started, listening on 50051 ``` 3. From another terminal, build the client and install it on your device: ```sh - $ ./gradlew :android:installDebug + ./gradlew :android:installDebug ``` 4. Launch the client app from your device. diff --git a/content/en/docs/platforms/web/quickstart.md b/content/en/docs/platforms/web/quickstart.md index c20395e6ff3..6d033023cea 100644 --- a/content/en/docs/platforms/web/quickstart.md +++ b/content/en/docs/platforms/web/quickstart.md @@ -20,13 +20,13 @@ The example code is part of the [grpc-web][] repo. the repo: ```sh - $ git clone https://github.com/grpc/grpc-web + git clone https://github.com/grpc/grpc-web ``` 2. Change to the repo's root directory: ```sh - $ cd grpc-web + cd grpc-web ``` ### Run an Echo example from your browser! @@ -36,7 +36,7 @@ From the `grpc-web` directory: 1. Fetch required packages and tools: ```sh - $ docker-compose pull prereqs node-server envoy commonjs-client + docker-compose pull prereqs node-server envoy commonjs-client ``` {{% alert title="Note" color="info" %}} @@ -51,7 +51,7 @@ WARNING: Some service image(s) must be built from source 2. Launch services as background processes: ```sh - $ docker-compose up -d node-server envoy commonjs-client + docker-compose up -d node-server envoy commonjs-client ``` 3. From your browser: diff --git a/content/en/docs/protoc-installation.md b/content/en/docs/protoc-installation.md index c44e330804c..75c4525c4dd 100644 --- a/content/en/docs/protoc-installation.md +++ b/content/en/docs/protoc-installation.md @@ -32,15 +32,15 @@ Linux or macOS using the following commands. - Linux, using `apt` or `apt-get`, for example: ```sh - $ apt install -y protobuf-compiler - $ protoc --version # Ensure compiler version is 3+ + apt install -y protobuf-compiler + protoc --version # Ensure compiler version is 3+ ``` - MacOS, using [Homebrew][]: ```sh - $ brew install protobuf - $ protoc --version # Ensure compiler version is 3+ + brew install protobuf + protoc --version # Ensure compiler version is 3+ ``` @@ -56,22 +56,22 @@ binaries, follow these instructions: as the following: ```sh - $ PB_REL="https://github.com/protocolbuffers/protobuf/releases" - $ curl -LO $PB_REL/download/v{{< param protoc-version >}}/protoc-{{< param protoc-version >}}-linux-x86_64.zip + PB_REL="https://github.com/protocolbuffers/protobuf/releases" + curl -LO $PB_REL/download/v{{< param protoc-version >}}/protoc-{{< param protoc-version >}}-linux-x86_64.zip ``` 2. Unzip the file under `$HOME/.local` or a directory of your choice. For example: ```sh - $ unzip protoc-{{< param protoc-version >}}-linux-x86_64.zip -d $HOME/.local + unzip protoc-{{< param protoc-version >}}-linux-x86_64.zip -d $HOME/.local ``` 3. Update your environment's path variable to include the path to the `protoc` executable. For example: ```sh - $ export PATH="$PATH:$HOME/.local/bin" + export PATH="$PATH:$HOME/.local/bin" ``` ### Other installation options