Skip to content

Commit

Permalink
fix: update code snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
carolinamenezes committed Jan 9, 2024
1 parent 97cf500 commit 2e8d083
Show file tree
Hide file tree
Showing 11 changed files with 60 additions and 60 deletions.
12 changes: 6 additions & 6 deletions docs/faststore/docs/api-extensions/extending-api-schema.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,19 @@ To declare a new type definition and resolver, create the following directory st

1. In your store repository, go to the `src` folder and create the `graphql` subfolder. You can do this by running the following command in your terminal:

```bash copy
```bash
mkdir graphql
```

2. Inside the new `graphql` folder, create the `vtex` subfolder.

```bash copy
```bash
mkdir vtex
```

3. In the `vtex` folder, create `resolvers` and `typeDefs` subfolders.

```bash copy
```bash
mkdir resolvers typeDefs
```

Expand Down Expand Up @@ -154,19 +154,19 @@ As such, FastStore must consume new data from third-party APIs.
1. In your store repository, go to the `src` folder and create the `graphql` subfolder. You can do this by running the following command in your terminal:

```bash copy
```bash
mkdir graphql
```

2. Inside the new `graphql` folder, create the `thirdParty` subfolder.

```bash copy
```bash
mkdir thirdParty
```

3. In `thirdParty`, create `resolvers` and `typeDefs` subfolders.

```bash copy
```bash
mkdir resolvers typeDefs
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ Even though you can add information to the FastStore API schema, you must be car

1. In the `src` folder of your store code, create the `fragments` folder.

```bash copy
```bash
mkdir fragments
```

2. In the `fragments` folder, create the file named `ServerProduct.ts`.

```bash copy
```bash
touch ServerProduct.ts
```> ⚠️ The name of the file should match the name of the query you want to extend without the Query suffix. In our example we're extending the `ServerProductQuery`, so the fragment file must be `ServerProduct.ts`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@ Here's how the initial component looks like with the `size` prop set as `regular

<Tabs items={['macOS and Linux', 'Windows']}>
<Tab>
```bash copy
```bash
mkdir src/components src/components/overrides
```
</Tab>
<Tab>
```bash copy
```bash
mkdir src\components src\components\overrides
```
</Tab>
Expand All @@ -78,12 +78,12 @@ mkdir src\components src\components\overrides

<Tabs items={['macOS and Linux', 'Windows']}>
<Tab>
```bash copy
```bash
touch src/components/overrides/ProductDetails.tsx
```
</Tab>
<Tab>
```bash copy
```bash
type nul > src\components\overrides\ProductDetails.tsx
```
</Tab>
Expand Down Expand Up @@ -157,12 +157,12 @@ For this guide we will create a custom Buy Button that once you click on it, it

<Tabs items={['macOS and Linux', 'Windows']}>
<Tab>
```bash copy
```bash
touch src/components/CustomBuyButton.tsx
```
</Tab>
<Tab>
```bash copy
```bash
type nul > src\components\CustomBuyButton.tsx
```
</Tab>
Expand Down
16 changes: 8 additions & 8 deletions docs/faststore/docs/customizing/mixins-breakpoints.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ Follow the steps below to override the pre-defined sizing system for the screen

<Tabs items={['macOS and Linux', 'Windows']}>
<Tab>
```bash copy
```bash
mkdir src/styles
```
</Tab>
<Tab>
```bash copy
```bash
mkdir src\styles
```
</Tab>
Expand All @@ -43,12 +43,12 @@ Follow the steps below to override the pre-defined sizing system for the screen

<Tabs items={['macOS and Linux', 'Windows']}>
<Tab>
```bash copy
```bash
touch src/styles/custom-mixins.scss
```
</Tab>
<Tab>
```bash copy
```bash
type nul > src\styles\custom-mixins.scss
```
</Tab>
Expand Down Expand Up @@ -195,12 +195,12 @@ Overriding the predefined mixins follows a process similar to the [customizing b

<Tabs items={['macOS and Linux', 'Windows']}>
<Tab>
```bash copy
```bash
mkdir src/styles
```
</Tab>
<Tab>
```bash copy
```bash
mkdir src\styles
```
</Tab>
Expand All @@ -210,12 +210,12 @@ Overriding the predefined mixins follows a process similar to the [customizing b

<Tabs items={['macOS and Linux', 'Windows']}>
<Tab>
```bash copy
```bash
touch src/styles/custom-mixins.scss
```
</Tab>
<Tab>
```bash copy
```bash
type nul > src\styles\custom-mixins.scss
```
</Tab>
Expand Down
8 changes: 4 additions & 4 deletions docs/faststore/docs/getting-started-requirements.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ To prevent content duplicationthat could cause build failures during Onboarding,

1. Open the terminal and log in to your account using the following command. *Remember to replace `{accountName}` with your account's name, for example, `vtex login mystore`*.

```bash copy
```bash
vtex login {accountName}
```

Expand All @@ -33,7 +33,7 @@ If yes, proceed to check other requirements. If not, install them by following t

1. After logging into your account, install `vtex.admin-cms@1.x` by running the following command:

```bash copy
```bash
vtex install vtex.admin-cms@1.x
```

Expand All @@ -43,7 +43,7 @@ If yes, proceed to check other requirements. If not, install them by following t

2. Install the Headless CMS dependencies by running the following command:

```bash copy
```bash
vtex install vtex.admin-cms-graphql vtex.admin-cms-graphql-rc
```

Expand Down Expand Up @@ -74,7 +74,7 @@ To integrate the VTEX Intelligent Search, go to the VTEX Admin and access **Stor
1. In the VTEX IO CLI, log in to your VTEX account by running `vtex login {accountName}`. *Remember to replace the value between brackets with your account name.*
2. If the VTEX Intelligent Search app is not installed in your account, run the following for Intelligent Search:

```bash copy
```bash
vtex install vtex.search-resolver@1.x vtex.admin-search@1.x
```

Expand Down
14 changes: 7 additions & 7 deletions docs/faststore/docs/getting-started/2-setting-up-the-project.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ Before cloning your store's repository, ensure that you have the following tools
</p>
<details>
<summary>Install Yarn on macOS by running the following:</summary>
```bash copy
```bash
brew install yarn
```
</details>

<details>
<summary>Install Yarn on Windows by running the following:</summary>
```bash copy
```bash
npm install -g yarn
```
</details>
Expand Down Expand Up @@ -105,21 +105,21 @@ To activate Developer Mode, refer to Microsoft's official guide on [Enabling you
2. Clone the repository created during the [FastStore Onboarding](/docs/guides/faststore/getting-started-1-faststore-onboarding-onboarding#repository-and-live-store-created) by running the following command in the terminal:

```bash copy
```bash
git clone https://github.com/vtex-sites/{storeName}
```

> ⚠️ Replace `{storeName}` for your store's repository.
3. Change into the working directory by running the following command:

```bash copy
```bash
cd {storeName}
```

4. Install all the dependencies listed within the `package.json` file by running the following command:

```bash copy
```bash
yarn install
```

Expand All @@ -136,13 +136,13 @@ Let's check what the project looks like in a web browser so far.

1. Start a local development server to serve your website:

```bash copy
```bash
yarn dev
```

This may take a few minutes. Once your development server is ready, the command line will output a similar message as the following:

```bash copy
```bash
ready - started server on 0.0.0.0:3000, url: http://localhost:3000
event - compiled client and server successfully in 333 ms (951 modules)
```
Expand Down
20 changes: 10 additions & 10 deletions docs/faststore/docs/getting-started/4-faststore-cli.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,31 +20,31 @@ The CLI is a dependency in the `package.json` file of the FastStore project, so

Starts the project in the development environment and usually servers it at `http://localhost:3000`. It allows you to make changes to the project and see the results in real-time locally on your machine without affecting the production environment.

```bash copy
```bash
yarn dev
```

#### `build`

Generates a store in the production environment by compiling the project and optimizing it for production usage.

```bash copy
```bash
yarn build
```

#### `start`

Executes a Next.js project in the root directory and usually servers it at `http://localhost:3000`.

```bash copy
```bash
yarn start
```

#### `cms-sync`

Sync your FastStore repository cms folder changes with the Headless CMS app.

```bash copy
```bash
yarn cms-sync
```

Expand All @@ -54,38 +54,38 @@ Sync your FastStore repository cms folder changes with the Headless CMS app.

Installing the CLI via `npm` allows you to use its commands in your machine. To install [`@faststore/cli`](https://www.npmjs.com/package/@faststore/cli) package, run the following in the terminal:

```bash copy
```bash
npm install -g @faststore/cli
```

### Commands

#### `dev`

```bash copy
```bash
faststore dev
```

#### `build`

```bash copy
```bash
faststore build
```

#### `start`

```bash copy
```bash
faststore start
```

#### `cms-sync`

```bash copy
```bash
faststore cms-sync
```

#### `help`

```bash copy
```bash
yarn faststore help [COMMAND] [-n]
```
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,19 @@ You will use the FastStore plugin for the VTEX IO CLI to install, with a single

> ℹ️ Remember to replace the values between curly brackets according to your scenario.
```bash copy
```bash
vtex login {account}
```

2. Install the FastStore plugin for the VTEX IO CLI:

```bash copy
```bash
vtex plugins install faststore
```

3. Set up your VTEX account for FastStore by running the following command:

```bash copy
```bash
vtex faststore setup
```

Expand Down
Loading

0 comments on commit 2e8d083

Please sign in to comment.