Skip to content

Commit

Permalink
add missing "--" for npm run options (unfortunately they don't get st…
Browse files Browse the repository at this point in the history
…ripped by npm2yarn, and are required foor npm)
  • Loading branch information
slorber committed Jan 15, 2021
1 parent 86ddb02 commit c62c343
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion website/docs/deployment.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ It is not the most performant solution
Docusaurus can be self hosted using [`docusaurus serve`](cli.md#docusaurus-serve). Change port using `--port` and `--host` to change host.

```bash npm2yarn
npm run serve --build --port 80 --host 0.0.0.0
npm run serve -- --build --port 80 --host 0.0.0.0
```

## Deploying to GitHub Pages
Expand Down
2 changes: 1 addition & 1 deletion website/docs/guides/docs/docs-multi-instance.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ The instance paths will be simpler, and retro-compatible with a single-instance
Each plugin instance will have its own cli command to tag a new version. They will be displayed if you run:

```bash npm2yarn
npm run docusaurus --help
npm run docusaurus -- --help
```

To version the product/default docs plugin instance:
Expand Down
4 changes: 2 additions & 2 deletions website/docs/i18n/i18n-crowdin.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ npm run write-translations
Upload all the JSON and Markdown translation files:

```bash npm2yarn
npm run crowdin -- upload
npm run crowdin upload
```

![Crowdin CLI uploading Docusaurus source files](/img/crowdin/crowdin-upload-sources-cli.png)
Expand Down Expand Up @@ -277,7 +277,7 @@ Use the `Hide String` feature first, as Crowdin is pre-translating things too op
Use the Crowdin CLI to download the translated JSON and Markdown files.

```bash npm2yarn
npm run crowdin -- download
npm run crowdin download
```

The translated content should be downloaded in `i18n/fr`.
Expand Down
8 changes: 4 additions & 4 deletions website/docs/i18n/i18n-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ module.exports = {
Start your localized site in dev mode, using the locale of your choice:

```bash npm2yarn
npm run start --locale fr
npm run start -- --locale fr
```

Your site is accessible at **`http://localhost:3000/fr/`**, but **falls back to untranslated content**.
Expand All @@ -81,7 +81,7 @@ Docusaurus is modular, and each content plugin has its own subfolder.

:::note

After copying files around, restart your site with `npm run start --locale fr`.
After copying files around, restart your site with `npm run start -- --locale fr`.

Hot-reload will work better when editing existing files.

Expand Down Expand Up @@ -145,7 +145,7 @@ JSON translation files are used for everything that is not contained in a Markdo
Run the [write-translations](../cli.md#docusaurus-write-translations) command:

```bash npm2yarn
npm run write-translations --locale fr
npm run write-translations -- --locale fr
```

It will extract and initialize the JSON translation files that you need to translate.
Expand Down Expand Up @@ -267,7 +267,7 @@ The Docusaurus v2 website use this strategy:
You can also build your site for a single locale:

```bash npm2yarn
npm run build --locale fr
npm run build -- --locale fr
```

Docusaurus will not add the `/fr/` url prefix.
Expand Down
2 changes: 1 addition & 1 deletion website/docs/typescript-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Now you can start writing TypeScript theme components.
For themes that supports TypeScript theme components, you can add the `--typescript` flag to the end of swizzling command to get TypeScript source code. For example, the following command will generate `index.tsx` and `styles.module.css` into `src/theme/Footer`.

```bash npm2yarn
npm run swizzle @docusaurus/theme-classic Footer --typescript
npm run swizzle @docusaurus/theme-classic Footer -- --typescript
```

At this moment, the only official Docusaurus theme that supports TypeScript theme components is `@docusaurus/theme-classic`. If you are a Docusaurus theme package author who wants to add TypeScript support, see the [Lifecycle APIs docs](./lifecycle-apis.md#gettypescriptthemepath).

0 comments on commit c62c343

Please sign in to comment.