Skip to content

Commit 0b657b2

Browse files
committed
docs: add bun commands and code-group
1 parent fb027e6 commit 0b657b2

File tree

7 files changed

+77
-29
lines changed

7 files changed

+77
-29
lines changed

packages/docs/src/guide-advanced/ssr.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,22 @@ vue add @akryum/ssr
2424

2525
Install the SSR utils with:
2626

27-
```shell
28-
npm install --save @vue/apollo-ssr
27+
::: code-group
28+
29+
```shell [npm]
30+
$ npm install @vue/apollo-ssr
2931
```
3032

31-
Or:
33+
```shell [Yarn]
34+
$ yarn add @vue/apollo-ssr
35+
```
3236

33-
```shell
34-
yarn add @vue/apollo-ssr
37+
```shell [Bun]
38+
$ bun add @vue/apollo-ssr
3539
```
3640

41+
:::
42+
3743
::: tip
3844
Follow the [offical SSR guide](https://ssr.vuejs.org) to learn more about Server-Side Rendering with Vue.
3945
:::

packages/docs/src/guide-components/setup.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,22 @@ Make sure you have [installed Apollo Client](../guide/installation.md).
44

55
## 1. Install @vue/apollo-components
66

7-
```
8-
npm install --save @vue/apollo-option @vue/apollo-components
9-
```
7+
::: code-group
108

11-
Or:
9+
```shell [npm]
10+
$ npm install @vue/apollo-option @vue/apollo-components
11+
```
1212

13+
```shell [Yarn]
14+
$ yarn add @vue/apollo-option @vue/apollo-components
1315
```
14-
yarn add @vue/apollo-option @vue/apollo-components
16+
17+
```shell [Bun]
18+
$ bun add @vue/apollo-option @vue/apollo-components
1519
```
1620

21+
:::
22+
1723
## 2. Create the Apollo client
1824

1925
```js

packages/docs/src/guide-composable/setup.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,20 @@ Make sure you have [installed Apollo Client](../guide/installation.md).
44

55
## 1. Install @vue/apollo-composable
66

7-
```shell
8-
npm install --save @vue/apollo-composable
7+
::: code-group
8+
9+
```shell [npm]
10+
$ npm install @vue/apollo-composable
911
```
1012

11-
Or:
13+
```shell [Yarn]
14+
$ yarn add @vue/apollo-composable
15+
```
1216

13-
```shell
14-
yarn add @vue/apollo-composable
17+
```shell [Bun]
18+
$ bun add @vue/apollo-composable
1519
```
20+
:::
1621

1722
## 2. Connect Apollo Client to Vue
1823

packages/docs/src/guide-composable/subscription.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,19 @@ Apollo Client supports both *graphql-ws* and *subscriptions-transport-ws*. Apoll
6161

6262
### The new library: **graphql-ws**
6363
Let's look at how to add support for this transport to Apollo Client using a link set up for newest library [graphql-ws](https://github.com/enisdenjo/graphql-ws). First, install:
64-
```bash
65-
npm install graphql-ws
64+
65+
::: code-group
66+
67+
```bash [npm]
68+
$ npm install graphql-ws
69+
```
70+
71+
```bash [Bun]
72+
$ bun add graphql-ws
6673
```
74+
75+
:::
76+
6777
Then initialize a GraphQL web socket link:
6878

6979
```js

packages/docs/src/guide-option/setup.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,20 @@ Make sure you have [installed Apollo Client](../guide/installation.md).
44

55
## 1. Install @vue/apollo-option
66

7-
```
8-
npm install --save @vue/apollo-option
9-
```
7+
::: code-group
108

11-
Or:
9+
```shell [npm]
10+
$ npm install @vue/apollo-option
11+
```
1212

13+
```shell [Yarn]
14+
$ yarn add @vue/apollo-option
1315
```
14-
yarn add @vue/apollo-option
16+
17+
```shell [Bun]
18+
$ bun add @vue/apollo-option
1519
```
20+
:::
1621

1722
## 2. Create the Apollo client
1823

packages/docs/src/guide-option/subscriptions.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,19 @@ Apollo Client supports both *graphql-ws* and *subscriptions-transport-ws*. Apoll
88

99
### The new library: **graphql-ws**
1010
Let's look at how to add support for this transport to Apollo Client using a link set up for newest library [graphql-ws](https://github.com/enisdenjo/graphql-ws). First, install:
11-
```bash
12-
npm install graphql-ws
11+
12+
::: code-group
13+
14+
```bash [npm]
15+
$ npm install graphql-ws
16+
```
17+
18+
```bash [Bun]
19+
$ bun add graphql-ws
1320
```
21+
22+
:::
23+
1424
Then initialize a GraphQL web socket link:
1525

1626
```js

packages/docs/src/guide/installation.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,22 @@ Then you can skip to next section: [Basic Usage](../guide-option/usage.md).
2929

3030
## Manual installation
3131

32-
```shell
33-
npm install --save graphql graphql-tag @apollo/client
32+
::: code-group
33+
34+
```shell [npm]
35+
$ npm install graphql graphql-tag @apollo/client
3436
```
3537

36-
Or:
38+
```shell [Yarn]
39+
$ yarn add graphql graphql-tag @apollo/client
40+
```
3741

38-
```shell
39-
yarn add graphql graphql-tag @apollo/client
42+
```shell [Bun]
43+
$ bun add graphql graphql-tag @apollo/client
4044
```
4145

46+
:::
47+
4248
In your app, create an `ApolloClient` instance:
4349

4450
```js

0 commit comments

Comments
 (0)