-
Notifications
You must be signed in to change notification settings - Fork 84
Closed
Description
A new user trying to use OpenAPI in there Docusaurus project should be able to easily create a new project by running an npx command.
Similar to create-docusaurus and create-react-app:
npx create-docusaurus@latest my-website classic
// or
npx create-react-app my-app
Options
1) Custom Docusaurus template
The create-docusaurus command allows for passing a custom template in the form of a GitHub repo:
npx create-docusaurus@latest my-website https://github.com/cloud-annotations/docusaurus-openapi-template.git
Pros
- We don't need to write/maintain our own CLI
Cons
- We need to maintain a separate repo with the template
- The CLI command is a bit long (not as easy to type by hand or from memory)
2) Custom CLI
We could write our own CLI that bootstraps a project:
npx create-docusaurus-openapi my-website
Pros
- Writing our own CLI would give us the option to keep both CLI and template code in this repo
- Shorter CLI command
Cons
- We need to write/maintain our own CLI
3) Feature request for create-docusaurus
Create a feature request for adding the option to use NPM packages as templates similar to create-react-app.
For example, creating a package docusaurus-template-openapi, would allow:
npx create-docusaurus@latest my-website openapi
Metadata
Metadata
Assignees
Labels
No labels