docusaurus icon indicating copy to clipboard operation
docusaurus copied to clipboard

The swizzle CLI should prompt for TS usage

Open slorber opened this issue 2 years ago • 1 comments

Have you read the Contributing Guidelines on issues?

Motivation

When using the swizzle CLI, we can get TypeScript copies of the theme files, but this requires to provide the --typescript option ahead of time.

yarn workspace website swizzle // will always copy JS files

yarn workspace website swizzle --typescript // will copy TS files, if available

When running yarn workspace website swizzle, the CLI should more interactive and promp the user if they want to use TypeScript.

To disable the promp, a language should be provided explicitly:

yarn workspace website swizzle --javascript
yarn workspace website swizzle --typescript

Related to https://github.com/facebook/docusaurus/issues/9401 (DX should be consistent)

slorber avatar Oct 13 '23 15:10 slorber

Is anyone working on this? I would love to work on this if no one took it yet

mqshaikh8 avatar Oct 16 '23 04:10 mqshaikh8