Skip to content

Commit

Permalink
Merge pull request #1221 from Unleash/docs/add-npm2yarn
Browse files Browse the repository at this point in the history
docs: add `npm2yarn` annotation to all npm commands
  • Loading branch information
thomasheartman committed Jan 4, 2022
2 parents 3a3cdc3 + 7444b2c commit be3452e
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion website/docs/deploy/getting-started.md
Expand Up @@ -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
```
Expand Down
4 changes: 2 additions & 2 deletions website/docs/how-to/how-to-use-custom-strategies.md
Expand Up @@ -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.js project** and **install the Unleash Client**:

``` shell
``` shell npm2yarn
npm init -y && \
npm install unleash-client
```
Expand Down Expand Up @@ -137,7 +137,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
```

Expand Down
2 changes: 1 addition & 1 deletion website/docs/sdks/node.md
Expand Up @@ -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
```

Expand Down
2 changes: 1 addition & 1 deletion website/docs/sdks/proxy-javascript.md
Expand Up @@ -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
```

Expand Down
4 changes: 1 addition & 3 deletions website/docs/sdks/proxy-react.md
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions website/docusaurus.config.js
Expand Up @@ -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'),
Expand Down
1 change: 1 addition & 0 deletions website/package.json
Expand Up @@ -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",
Expand Down

1 comment on commit be3452e

@vercel
Copy link

@vercel vercel bot commented on be3452e Jan 4, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.