From 2e8d0833fb1d756777f15b161d498ceaeb274900 Mon Sep 17 00:00:00 2001 From: Carolina Menezes Date: Tue, 9 Jan 2024 15:30:54 -0300 Subject: [PATCH] fix: update code snippets --- .../api-extensions/extending-api-schema.mdx | 12 +++++------ .../extending-queries-using-fragments.mdx | 4 ++-- .../overriding-components-and-props.mdx | 12 +++++------ .../docs/customizing/mixins-breakpoints.mdx | 16 +++++++-------- .../docs/getting-started-requirements.mdx | 8 ++++---- .../2-setting-up-the-project.mdx | 14 ++++++------- .../docs/getting-started/4-faststore-cli.mdx | 20 +++++++++---------- ...-setting-up-vtex-account-for-faststore.mdx | 6 +++--- ...g-the-vtex-order-placed-and-my-account.mdx | 20 +++++++++---------- .../1-configuring-the-vtex-account.mdx | 4 ++-- .../4-Promoting-your-changes.mdx | 4 ++-- 11 files changed, 60 insertions(+), 60 deletions(-) diff --git a/docs/faststore/docs/api-extensions/extending-api-schema.mdx b/docs/faststore/docs/api-extensions/extending-api-schema.mdx index 717425b30a..212c382c8a 100644 --- a/docs/faststore/docs/api-extensions/extending-api-schema.mdx +++ b/docs/faststore/docs/api-extensions/extending-api-schema.mdx @@ -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 ``` @@ -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 ``` diff --git a/docs/faststore/docs/api-extensions/extending-queries-using-fragments.mdx b/docs/faststore/docs/api-extensions/extending-queries-using-fragments.mdx index 58c182e998..92f72e1554 100644 --- a/docs/faststore/docs/api-extensions/extending-queries-using-fragments.mdx +++ b/docs/faststore/docs/api-extensions/extending-queries-using-fragments.mdx @@ -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`. diff --git a/docs/faststore/docs/building-sections/overriding-components-and-props.mdx b/docs/faststore/docs/building-sections/overriding-components-and-props.mdx index 7e0265d314..ae5671da79 100644 --- a/docs/faststore/docs/building-sections/overriding-components-and-props.mdx +++ b/docs/faststore/docs/building-sections/overriding-components-and-props.mdx @@ -63,12 +63,12 @@ Here's how the initial component looks like with the `size` prop set as `regular -```bash copy +```bash mkdir src/components src/components/overrides ``` -```bash copy +```bash mkdir src\components src\components\overrides ``` @@ -78,12 +78,12 @@ mkdir src\components src\components\overrides -```bash copy +```bash touch src/components/overrides/ProductDetails.tsx ``` -```bash copy +```bash type nul > src\components\overrides\ProductDetails.tsx ``` @@ -157,12 +157,12 @@ For this guide we will create a custom Buy Button that once you click on it, it -```bash copy +```bash touch src/components/CustomBuyButton.tsx ``` -```bash copy +```bash type nul > src\components\CustomBuyButton.tsx ``` diff --git a/docs/faststore/docs/customizing/mixins-breakpoints.mdx b/docs/faststore/docs/customizing/mixins-breakpoints.mdx index 06877488ce..177bea7892 100644 --- a/docs/faststore/docs/customizing/mixins-breakpoints.mdx +++ b/docs/faststore/docs/customizing/mixins-breakpoints.mdx @@ -28,12 +28,12 @@ Follow the steps below to override the pre-defined sizing system for the screen - ```bash copy + ```bash mkdir src/styles ``` - ```bash copy + ```bash mkdir src\styles ``` @@ -43,12 +43,12 @@ Follow the steps below to override the pre-defined sizing system for the screen - ```bash copy + ```bash touch src/styles/custom-mixins.scss ``` - ```bash copy + ```bash type nul > src\styles\custom-mixins.scss ``` @@ -195,12 +195,12 @@ Overriding the predefined mixins follows a process similar to the [customizing b - ```bash copy + ```bash mkdir src/styles ``` - ```bash copy + ```bash mkdir src\styles ``` @@ -210,12 +210,12 @@ Overriding the predefined mixins follows a process similar to the [customizing b - ```bash copy + ```bash touch src/styles/custom-mixins.scss ``` - ```bash copy + ```bash type nul > src\styles\custom-mixins.scss ``` diff --git a/docs/faststore/docs/getting-started-requirements.mdx b/docs/faststore/docs/getting-started-requirements.mdx index 4e703f7300..fb9899f74b 100644 --- a/docs/faststore/docs/getting-started-requirements.mdx +++ b/docs/faststore/docs/getting-started-requirements.mdx @@ -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} ``` @@ -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 ``` @@ -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 ``` @@ -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 ``` diff --git a/docs/faststore/docs/getting-started/2-setting-up-the-project.mdx b/docs/faststore/docs/getting-started/2-setting-up-the-project.mdx index 95c9960a19..e2023d77b2 100644 --- a/docs/faststore/docs/getting-started/2-setting-up-the-project.mdx +++ b/docs/faststore/docs/getting-started/2-setting-up-the-project.mdx @@ -45,14 +45,14 @@ Before cloning your store's repository, ensure that you have the following tools

Install Yarn on macOS by running the following: - ```bash copy + ```bash brew install yarn ```
Install Yarn on Windows by running the following: - ```bash copy + ```bash npm install -g yarn ```
@@ -105,7 +105,7 @@ 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} ``` @@ -113,13 +113,13 @@ To activate Developer Mode, refer to Microsoft's official guide on [Enabling you 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 ``` @@ -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) ``` diff --git a/docs/faststore/docs/getting-started/4-faststore-cli.mdx b/docs/faststore/docs/getting-started/4-faststore-cli.mdx index 6f10f1cf19..8a0fbbcbbc 100644 --- a/docs/faststore/docs/getting-started/4-faststore-cli.mdx +++ b/docs/faststore/docs/getting-started/4-faststore-cli.mdx @@ -20,7 +20,7 @@ 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 ``` @@ -28,7 +28,7 @@ Starts the project in the development environment and usually servers it at `htt Generates a store in the production environment by compiling the project and optimizing it for production usage. -```bash copy +```bash yarn build ``` @@ -36,7 +36,7 @@ Generates a store in the production environment by compiling the project and opt Executes a Next.js project in the root directory and usually servers it at `http://localhost:3000`. -```bash copy +```bash yarn start ``` @@ -44,7 +44,7 @@ Executes a Next.js project in the root directory and usually servers it at `http Sync your FastStore repository cms folder changes with the Headless CMS app. -```bash copy +```bash yarn cms-sync ``` @@ -54,7 +54,7 @@ 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 ``` @@ -62,30 +62,30 @@ Installing the CLI via `npm` allows you to use its commands in your machine. To #### `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] ``` diff --git a/docs/faststore/docs/go-live/1-setting-up-vtex-account-for-faststore.mdx b/docs/faststore/docs/go-live/1-setting-up-vtex-account-for-faststore.mdx index 4c254dafe9..475f983d64 100644 --- a/docs/faststore/docs/go-live/1-setting-up-vtex-account-for-faststore.mdx +++ b/docs/faststore/docs/go-live/1-setting-up-vtex-account-for-faststore.mdx @@ -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 ``` diff --git a/docs/faststore/docs/go-live/5-integrating-the-vtex-order-placed-and-my-account.mdx b/docs/faststore/docs/go-live/5-integrating-the-vtex-order-placed-and-my-account.mdx index 6cc1fa9e48..39fdd96ac1 100644 --- a/docs/faststore/docs/go-live/5-integrating-the-vtex-order-placed-and-my-account.mdx +++ b/docs/faststore/docs/go-live/5-integrating-the-vtex-order-placed-and-my-account.mdx @@ -28,7 +28,7 @@ Before proceeding any further, make sure you already have: 1. Open the terminal and clone the [`faststore-vtex-integrations`](https://github.com/vtex/faststore-vtex-integrations/) project into your local files. -```bash copy +```bash npx degit vtex/faststore-vtex-integrations ``` @@ -36,7 +36,7 @@ npx degit vtex/faststore-vtex-integrations 3. Open the `manifest.json` file and update the value of the `vendor` field with the name of your VTEX account. 4. Using the terminal, log in to your VTEX account. -```bash copy +```bash vtex login {account} ``` @@ -44,7 +44,7 @@ vtex login {account} 5. Create a new development workspace. -```bash copy +```bash vtex workspace use {workspace} ``` > ⚠️ Replace the value between curly brackets with any name of your preference, making sure the name you choose is not already taken. @@ -53,7 +53,7 @@ vtex workspace use {workspace} 6. Link your app to sync your local changes with the VTEX IO cloud development environment. -```bash copy +```bash vtex link ``` @@ -102,26 +102,26 @@ Now that everything is as expected, you need to make your changes publicly avail 1. Open the terminal and create a production workspace. -```bash copy +```bash vtex use {workspace} --production ``` 2. Change to the `faststore-vtex-integrations` directory. 3. Release a new app version. -```bash copy +```bash vtex release major stable ``` 3. Publish your app as a candidate version. -```bash copy +```bash vtex publish ``` 4. Install the candidate version indicating the app's version as in the following: -```bash copy +```bash vtex install {vendor}.{name}@{version} ``` @@ -129,13 +129,13 @@ vtex install {vendor}.{name}@{version} 5. Deploy the candidate version as a stable version. -```bash copy +```bash vtex deploy {vendor}.{appname}@{appversion} ``` 6. Promote your Production workspace to master to make your changes publicly available to your store shoppers. -```bash copy +```bash vtex workspace promote ``` diff --git a/docs/faststore/docs/headless-cms-integration/1-configuring-the-vtex-account.mdx b/docs/faststore/docs/headless-cms-integration/1-configuring-the-vtex-account.mdx index 8057fc2dab..2286172c4a 100644 --- a/docs/faststore/docs/headless-cms-integration/1-configuring-the-vtex-account.mdx +++ b/docs/faststore/docs/headless-cms-integration/1-configuring-the-vtex-account.mdx @@ -42,13 +42,13 @@ Ensure that you have installed the VTEX IO CLI on your machine. This CLI is requ > ⚠️ Remember to replace the values between curly brackets according to your account name. - ```bash copy + ```bash vtex login {account} ``` 2. Install the Headless CMS plugin: - ```bash copy + ```bash vtex plugins install cms ``` diff --git a/docs/faststore/docs/headless-cms-integration/4-Promoting-your-changes.mdx b/docs/faststore/docs/headless-cms-integration/4-Promoting-your-changes.mdx index 1b2d1e3809..bfe2570180 100644 --- a/docs/faststore/docs/headless-cms-integration/4-Promoting-your-changes.mdx +++ b/docs/faststore/docs/headless-cms-integration/4-Promoting-your-changes.mdx @@ -9,13 +9,13 @@ If you are happy with your Content type and Section and definitions, you can put 1. Open the terminal and switch to the `master` workspace. -```bash copy +```bash vtex use master ``` 2. Change to the root directory of your FastStore project and sync your changes in the `cms` folder with the Headless CMS app. -```bash copy +```bash faststore cms-sync ```