diff --git a/components/editor/CodeBlock.js b/components/editor/CodeBlock.js index 250f66032c86..db197c68b244 100644 --- a/components/editor/CodeBlock.js +++ b/components/editor/CodeBlock.js @@ -58,7 +58,7 @@ export default function CodeBlock({ )}
-
+
{hasWindow && (
diff --git a/pages/docs/tools/generator/installation-guide.md b/pages/docs/tools/generator/installation-guide.md index 69e81b53ff43..2fb5c1d7d034 100644 --- a/pages/docs/tools/generator/installation-guide.md +++ b/pages/docs/tools/generator/installation-guide.md @@ -13,12 +13,13 @@ Before you install and use the AsyncAPI CLI and the generator library, ensure yo 2. Npm v6.13.7 and higher To verify the versions of Node and Npm you have, run the following command on your terminal: -``` -npm -v -``` -``` -node -v -``` + +{`npm -v`} + +
+ +{`node -v`} + If you don't have either Node or Npm installed, use the [official node.js installer](https://nodejs.org/en/download/). @@ -32,14 +33,14 @@ The AsyncAPI CLI tool allows you to do many different things with the [AsyncAPI #### Install AsyncAPI CLI using NPM The AsyncAPI CLI is a NodeJS project, so the easiest way to install it is by using the following `npm` command: -``` -npm install -g @asyncapi/cli -``` + +{`npm install -g @asyncapi/cli`} + To install a specific version of the generator tool, pass the version during installation: -``` -npm install -g @asyncapi/cli@{version} -``` + +{`npm install -g @asyncapi/cli@{version}`} + #### MacOS You can install in MacOS by using brew: `brew install asyncapi`. @@ -58,20 +59,26 @@ For further installation instructions for different operating systems, read the ### Update AsyncAPI CLI There are several reasons why you might want to update your generator version: * You have the generator tool installed but want to use the latest released features. To upgrade to the latest version, use the command below: -``` -npm install -g @asyncapi/cli -``` + +
+ +{`npm install -g @asyncapi/cli`} + + * If your template isn't compatible with the latest generator version, you can update it to a specific version of the generator. Check the [version you need](https://github.com/asyncapi/cli/releases) and specify the version you want by using the **@** symbol as shown in the command below: -``` -npm install -g @asyncapi/cli@{version} -``` + +
+ +{`npm install -g @asyncapi/cli@{version}`} + + > Sometimes you have to force additional npm installation like this: `npm install -g --force @asyncapi/cli` ### Uninstall AsyncAPI CLI To uninstall the generator, use the following command: -``` -npm uninstall @asyncapi/cli -g -``` + +{`npm uninstall @asyncapi/cli -g`} + > :memo: **Note:** To use the generator in your CI/CD pipeline to automate whatever you generate for your event-driven architecture apps, install the AsyncAPI CLI in your pipeline. If you are using GitHub Actions, use [Github Actions for Generator](https://github.com/marketplace/actions/generator-for-asyncapi-documents). diff --git a/pages/docs/tools/generator/usage.md b/pages/docs/tools/generator/usage.md index 3315bf0fcaac..93325985fe75 100644 --- a/pages/docs/tools/generator/usage.md +++ b/pages/docs/tools/generator/usage.md @@ -29,8 +29,8 @@ Usage: asyncapi generate fromTemplate