Skip to content

docs(cli): docusaurus swizzle options table missing --javascript flag #12036

Description

@kiwigitops

Problem

The CLI reference page website/docs/cli.mdx for docusaurus swizzle does not document the --javascript (alias -j) option, even though it was added to the CLI in #9681 (closing #9402) and is still present on main.

From packages/docusaurus/src/commands/cli.ts:

cli
  .command('swizzle [themeName] [componentName] [siteDir]')
  ...
  .option('-w, --wrap',  ...)
  .option('-e, --eject', ...)
  .option('-l, --list',  ...)
  .option('-t, --typescript', 'copy TypeScript theme files when possible (default: false)')
  .option('-j, --javascript', 'copy JavaScript theme files when possible (default: false)')
  .option('--danger', ...)
  .option('--config <config>', ...)
  .action(swizzle);

The corresponding documentation table in website/docs/cli.mdx (#### Options section under swizzle) lists --list, --eject, --wrap, --danger, --typescript, --config — but not --javascript.

The companion page website/docs/swizzling.mdx contains no occurrence of javascript, --js, or -j either, so a user reading the docs has no way to discover the --javascript flag short of running docusaurus swizzle --help.

Expected

The CLI reference should list every flag the binary actually accepts, matching packages/docusaurus/src/commands/cli.ts. In particular, --javascript should appear with the same description it has in the source ("copy JavaScript theme files when possible").

Suggested fix

Add a row to the swizzle options table in website/docs/cli.mdx:

 | `--typescript` | Swizzle the TypeScript variant component |
+| `--javascript` | Swizzle the JavaScript variant component |
 | `--config` | Path to docusaurus config file, default to `[siteDir]/docusaurus.config.js` |

Happy to follow up with a PR if welcome.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions