Skip to content
This repository was archived by the owner on Sep 20, 2024. It is now read-only.

Commit c477467

Browse files
committed
docs: transitioned remaining package manager commands to CodeGroups
1 parent e87c429 commit c477467

File tree

5 files changed

+52
-17
lines changed

5 files changed

+52
-17
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
"deploy-storybook": "storybook-to-ghpages -- --out=.out",
4040
"now-build-storybook": "build-storybook -o dist/storybook",
4141
"docs:dev": "yarn docs-dev",
42+
"docs:lint": "yarn workspace chakra-ui-docs lint",
4243
"theme:dev": "yarn workspace @chakra-ui/theme-vue build",
4344
"docs-dev": "yarn workspace chakra-ui-docs dev",
4445
"evalbundle": "bundlesize"

website/pages/auto-import-components.mdx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import SEO from '../components/SEO'
2+
import { CodeGroup, CodeTab } from '~/components/code'
23

34
<SEO
45
title="Auto-import Chakra components"
@@ -13,16 +14,15 @@ This provides a better developer experience without sacrificing your application
1314

1415

1516
## Installation
16-
With Yarn:
1717

18-
```bash
19-
yarn add chakra-loader -D
20-
```
21-
With NPM:
22-
23-
```bash
24-
npm install chakra-loader --save-dev
25-
```
18+
<CodeGroup lang="bash">
19+
<CodeTab label="Yarn">
20+
yarn add chakra-loader
21+
</CodeTab>
22+
<CodeTab label="NPM">
23+
npm install chakra-loader
24+
</CodeTab>
25+
</CodeGroup>
2626

2727
## Usage
2828
If you're using webpack with Vue CLI or Nuxt.js for your Chakra project, import the `ChakraLoaderPlugin` from the `chakra-loader` package and add it to your `vue.config.js` file.

website/pages/contributing.mdx

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import SEO from '../components/SEO'
2+
import { CodeGroup, CodeTab } from '~/components/code'
23

34
<SEO
45
title="Contributing to Chakra UI Vue"
@@ -49,9 +50,16 @@ Chakra UI uses NuxtJS for its documentation website. Thank you in advance and
4950
cheers for contributing to our documentation! We created a simple command to run
5051
it.
5152

52-
```sh
53-
yarn docs:dev
54-
```
53+
<br/>
54+
55+
<CodeGroup lang="sh">
56+
<CodeTab label="Yarn">
57+
yarn docs:dev
58+
</CodeTab>
59+
<CodeTab label="NPM">
60+
npm run docs:dev
61+
</CodeTab>
62+
</CodeGroup>
5563

5664
You can now access the documentation site locally. Changes to the docs will hot
5765
reload the site.
@@ -60,13 +68,31 @@ reload the site.
6068

6169
Project setup
6270

63-
```sh
71+
<br/>
72+
73+
<CodeGroup lang="sh">
74+
<CodeTab label="Yarn">
75+
76+
```
6477
yarn bootstrap # Installs all dependencies and links packages
6578
yarn dev # Runs dev build
6679
yarn storybook # Starts storybook
6780
yarn test # Runs tests
6881
```
6982

83+
</CodeTab>
84+
<CodeTab label="NPM">
85+
86+
```
87+
npm run bootstrap # Installs all dependencies and links packages
88+
npm run dev # Runs dev build
89+
npm run storybook # Starts storybook
90+
npm run test # Runs tests
91+
```
92+
93+
</CodeTab>
94+
</CodeGroup>
95+
7096
## Code of Conduct
7197

7298
### Our Pledge

website/pages/getting-started.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Install Chakra UI Vue and it's peer dependency, `emotion`
1111
yarn add @chakra-ui/vue emotion
1212
</CodeTab>
1313
<CodeTab label="NPM">
14-
npm install @chakra-ui/vue emotion --save
14+
npm install @chakra-ui/vue emotion
1515
</CodeTab>
1616
</CodeGroup>
1717

website/pages/with-nuxt.mdx

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import SEO from '../components/SEO'
2+
import { CodeGroup, CodeTab } from '~/components/code'
23

34
<SEO
45
title="Using UI with Nuxt.js"
@@ -14,9 +15,16 @@ import SEO from '../components/SEO'
1415
With Nuxt.js we need to install the [`@nuxtjs/emotion`](https://github.com/nuxt-community/emotion-module) package to enable your component
1516
styles to be generated and injected in the server build.
1617

17-
```bash
18-
yarn add @chakra-ui/nuxt @nuxtjs/emotion
19-
```
18+
<br/>
19+
20+
<CodeGroup lang="bash">
21+
<CodeTab label="Yarn">
22+
yarn add @chakra-ui/nuxt @nuxtjs/emotion
23+
</CodeTab>
24+
<CodeTab label="NPM">
25+
npm install @chakra-ui/nuxt @nuxtjs/emotion
26+
</CodeTab>
27+
</CodeGroup>
2028

2129
## Registering the Chakra module
2230
We then register the Chakra UI module in the `modules` key of our `nuxt.config.js`.

0 commit comments

Comments
 (0)