docs: used the NPX CLI tool across docs (#4099)

This commit is contained in:
Shahed Nasser
2023-05-15 11:04:14 +03:00
committed by GitHub
parent 23a0c5b71e
commit 7da6cc961e
57 changed files with 74 additions and 68 deletions

View File

@@ -91,7 +91,7 @@ Where `test` is the name of the database schema that should be used instead of `
Remember to run migrations after you change your database type to `postgres` from another type:
```bash
medusa migrations run
npx @medusajs/medusa-cli migrations run
```
### Common Configuration

View File

@@ -272,7 +272,7 @@ class PublishStrategy extends AbstractBatchJobStrategy {
After you create the batch job and before testing it out, you must run the build command in the directory of your Medusa backend:
```bash
```bash npm2yarn
npm run build
```
@@ -283,7 +283,7 @@ npm run build
This section covers how to test and use your batch job strategy. Make sure to start your backend first:
```bash
npm run start
npx @medusajs/medusa-cli develop
```
:::info

View File

@@ -253,7 +253,7 @@ You can also add any necessary options to the module. The options added in the e
Then, to test the module, run the Medusa backend which also runs your module:
```bash npm2yarn
npm run start
npx @medusajs/medusa-cli develop
```
---

View File

@@ -64,7 +64,7 @@ This registers the in-memory cache module as the main cache service to use. You
To test the module, run the following command to start the Medusa backend:
```bash npm2yarn
npm run start
npx @medusajs/medusa-cli develop
```
The backend should then start with no errors, indicating that the module was installed successfully.

View File

@@ -82,7 +82,7 @@ Other available options include:
To test the module, run the following command to start the Medusa backend:
```bash npm2yarn
npm run start
npx @medusajs/medusa-cli develop
```
If the module was installed successfully, you should see the following message in the logs:

View File

@@ -193,7 +193,7 @@ npm run build
Then, run your backend with the following command:
```bash npm2yarn
npm run start
npx @medusajs/medusa-cli develop
```
If you try accessing the endpoints you added the middleware to, you should see your implementation working as expected.

View File

@@ -125,7 +125,7 @@ npm run build
Then, run the following command to start your backend:
```bash npm2yarn
npm run start
npx @medusajs/medusa-cli develop
```
You should see your custom implementation working as expected.

View File

@@ -248,7 +248,7 @@ You can also add any necessary options to the module.
Then, to test the module, run the Medusa backend which also runs your module:
```bash npm2yarn
npm run start
npx @medusajs/medusa-cli develop
```
---

View File

@@ -58,7 +58,7 @@ This registers the local events module as the main events service to use. This m
To test the module, run the following command to start the Medusa backend:
```bash npm2yarn
npm run start
npx @medusajs/medusa-cli develop
```
If the module was installed successfully, you should see the following message in the logs:

View File

@@ -85,7 +85,7 @@ Other available options include:
To test the module, run the following command to start the Medusa backend:
```bash npm2yarn
npm run start
npx @medusajs/medusa-cli develop
```
If the module was installed successfully, you should see the following message in the logs:

View File

@@ -59,7 +59,7 @@ For example, if the value of the environment variable is set to `false`, but the
As feature flags generally include adding new entities or making changes to entities in the database, you must run the migrations after enabling the feature flag:
```bash
medusa migrations run
npx @medusajs/medusa-cli migrations run
```
:::info

View File

@@ -397,7 +397,7 @@ This section explains how to test out your implementation if the file service wa
Run your backend to test it out:
```bash npm2yarn
npm run start
npx @medusajs/medusa-cli develop
```
Then, try uploading a file, for example, using the [Upload File endpoint](/api/admin#tag/Uploads/operation/PostUploads). The file should be uploaded based on the logic youve implemented.

View File

@@ -80,7 +80,7 @@ This section explains how to test out the loader if its created in the Medusa
Run the following command to start the Medusa backend:
```bash npm2yarn
npm run start
npx @medusajs/medusa-cli develop
```
Your loader script should run on the Medusa backend startup. If you logged a message in the console, similar to the example above, you should see it in the console.

View File

@@ -293,7 +293,7 @@ The `resources` property can have one of the following values:
Finally, to test your module, run the following command:
```bash npm2yarn
npm run start
npx @medusajs/medusa-cli develop
```
This starts the Medusa backend and runs your module as part of it.

View File

@@ -297,13 +297,19 @@ Notice that the value of the `identifier` static property defined in the `EmailS
Make sure you have an event bus module configured in your Medusa backend. You can learn more on how to do that in the [Configurations guide](../backend/configurations.md).
Then, start by running your Medusa backend:
Then, run the build command in the root directory of your Medusa backend:
```bash npm2yarn
npm run start
npm run build
```
Then, place an order either using the [REST APIs](/api/store) or using the storefront.
Next, start your Medusa backend:
```bash npm2yarn
npx @medusajs/medusa-cli develop
```
Try now to place an order either using the [REST APIs](/api/store) or using the storefront.
:::tip

View File

@@ -146,7 +146,7 @@ npm run build
Then, run the following command to start your Medusa backend:
```bash npm2yarn
npm run start
npx @medusajs/medusa-cli develop
```
If the scheduled job was registered successfully, you should see a message similar to this logged on your Medusa backend:

View File

@@ -403,7 +403,7 @@ This section explains how to test out your implementation if the search service
Run your backend to test it out:
```bash npm2yarn
npm run start
npx @medusajs/medusa-cli develop
```
You can then send a request to the [Search Products endpoint](/api/store#tag/Products/operation/PostProductsSearch) to see if your search service returns any results.

View File

@@ -80,7 +80,7 @@ npm run build
Then, start the backend:
```bash npm2yarn
npm run start
npx @medusajs/medusa-cli develop
```
You should see the customizations you made in effect.

View File

@@ -73,7 +73,7 @@ npm run build
Run your backend to test it out:
```bash npm2yarn
npm run start
npx @medusajs/medusa-cli develop
```
You can test now whether your strategy is working by performing the actions that run your strategy.