diff --git a/website/docs/deploy/getting-started.md b/website/docs/deploy/getting-started.md index 6a13a1e2ee..a865725375 100644 --- a/website/docs/deploy/getting-started.md +++ b/website/docs/deploy/getting-started.md @@ -73,7 +73,7 @@ docker run -p 4242:4242 \ 1. Create a new folder/directory on your development computer. 2. From a terminal/bash shell, install the dependencies: - ```sh + ```shell npm2yarn npm init npm install unleash-server --save ``` diff --git a/website/docs/how-to/how-to-use-custom-strategies.md b/website/docs/how-to/how-to-use-custom-strategies.md index 4059a2c21a..3a74cbacfe 100644 --- a/website/docs/how-to/how-to-use-custom-strategies.md +++ b/website/docs/how-to/how-to-use-custom-strategies.md @@ -94,7 +94,7 @@ Strategies are stored in separate JavaScript files and loaded into the container 1. **Create a strategies directory.** Create a directory that Docker has access to where you can store your strategies. The next steps assume you called it `strategies` 2. **Initialize a node project** and **install the Unleash Client**: - ``` shell + ``` shell npm2yarn npm init -y && \ npm install unleash-client ``` @@ -140,7 +140,7 @@ The Unleash Proxy accepts a `customStrategies` property as part of its initializ 1. **Install the `unleash-client` package**. You'll need this to implement the custom strategy: - ``` shell + ``` shell npm2yarn npm install unleash-client ``` diff --git a/website/docs/sdks/node.md b/website/docs/sdks/node.md index 786c5b5ad4..8c1470a5e8 100644 --- a/website/docs/sdks/node.md +++ b/website/docs/sdks/node.md @@ -11,7 +11,7 @@ In this guide we explain how to use feature toggles in a Node application using First we must install Node.js dependency: -```sh +```shell npm2yarn npm install unleash-client ``` diff --git a/website/docs/sdks/proxy-javascript.md b/website/docs/sdks/proxy-javascript.md index 65a1c5c393..288cbdf6e1 100644 --- a/website/docs/sdks/proxy-javascript.md +++ b/website/docs/sdks/proxy-javascript.md @@ -15,7 +15,7 @@ For single-page apps we have a tiny proxy-client in JavaScript, without any exte **Step 1: Install** -``` +```shell npm2yarn npm install unleash-proxy-client ``` diff --git a/website/docs/sdks/proxy-react.md b/website/docs/sdks/proxy-react.md index a5474b6c9e..c1876d792a 100644 --- a/website/docs/sdks/proxy-react.md +++ b/website/docs/sdks/proxy-react.md @@ -10,10 +10,8 @@ For more detailed information, check out [the React Proxy SDK on GitHub](https:/ ## Installation -```sh +```shell npm2yarn npm install @unleash/proxy-client-react -// or -yarn add @unleash/proxy-client-react ``` ## Initialize the client diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index 525de86a52..3ea88305ef 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -110,6 +110,9 @@ module.exports = { editUrl: 'https://github.com/Unleash/unleash/edit/master/website/', routeBasePath: '/', + remarkPlugins: [ + [require('@docusaurus/remark-plugin-npm2yarn'), {sync: true}] + ] }, theme: { customCss: require.resolve('./src/css/custom.css'), diff --git a/website/package.json b/website/package.json index 4a96b0335a..bb69195f9c 100644 --- a/website/package.json +++ b/website/package.json @@ -17,6 +17,7 @@ "@docusaurus/core": "2.0.0-beta.9", "@docusaurus/plugin-client-redirects": "2.0.0-beta.9", "@docusaurus/preset-classic": "2.0.0-beta.9", + "@docusaurus/remark-plugin-npm2yarn": "^2.0.0-beta.14", "@mdx-js/react": "1.6.22", "@svgr/webpack": "6.1.2", "clsx": "1.1.1",