-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add plugin cli docs page (#1965)
* feat: add plugin cli docs page * chore: edit create-a-plugin page * Fix unwanted line indentation changes * Split content into a guide and a reference * Add guide to plugins development intro. * Add Plugin CLI docs to TOC * Fix capitalization * Fix SEO for reference page --------- Co-authored-by: Pierre Wizla <[email protected]>
- Loading branch information
1 parent
7f245a7
commit 00dc22d
Showing
5 changed files
with
307 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
87 changes: 87 additions & 0 deletions
87
docusaurus/docs/dev-docs/plugins/development/plugin-cli.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
--- | ||
title: Plugin CLI | ||
description: Reference documentation for Strapi's Plugin CLI commands | ||
displayed_sidebar: devDocsSidebar | ||
--- | ||
|
||
# Plugin CLI reference | ||
|
||
:::caution | ||
The Plugin CLI is currently experimental. | ||
::: | ||
|
||
The Plugin CLI is set of commands orientated around developing plugins to use them as local plugins or to publish them on NPM and/or submit them to the Marketplace. | ||
|
||
The present documentation lists the available Plugin CLI commands. The [associated guide](/dev-docs/plugins/guides/use-the-plugin-cli) illustrates how to use these commands to create a plugin from scratch, link it to an existing project, and publish it. | ||
|
||
## strapi plugin:init | ||
|
||
Create a new plugin at a given path. | ||
|
||
```bash | ||
strapi plugin:init <path> | ||
``` | ||
|
||
| Arguments | Type | Description | Default | | ||
| --------- | :----: | --------------------| ------------------------- | | ||
| `path` | string | Path to the plugin | `./src/plugins/my-plugin` | | ||
|
||
| Option | Type | Description | Default | | ||
| ------------- | :--: | ---------------------------------------- |---------| | ||
| `-d, --debug` | - | Enable debugging mode with verbose logs | false | | ||
| `--silent` | - | Do not log anything | false | | ||
|
||
## strapi plugin:build | ||
|
||
Bundle the strapi plugin for publishing. | ||
|
||
```bash | ||
strapi plugin:build | ||
``` | ||
|
||
| Option | Type | Description | Default | | ||
| -------------- | :----: | ----------------------------------------------------------------------------------------------------------------- | --------| | ||
| `--force` | string | Automatically answer "yes" to all prompts, including potentially destructive requests, and run non-interactively. | - | | ||
| `-d, --debug` | - | Enable debugging mode with verbose logs | false | | ||
| `--silent` | - | Do not log anything | false | | ||
| `--minify` | - | Minify the output | true | | ||
| `--sourcemaps` | - | Produce sourcemaps | false | | ||
|
||
## strapi plugin:link-watch | ||
|
||
Recompiles the plugin automatically on changes and runs `yalc push --publish`. | ||
|
||
```bash | ||
strapi plugin:link-watch | ||
``` | ||
|
||
| Option | Type | Description | Default | | ||
| ------------- | :--: | -------------------------------------------------------- | --------| | ||
| `-d, --debug` | - | Enable debugging mode with verbose logs | false | | ||
| `--silent` | - | Do not log anything | false | | ||
|
||
## strapi plugin:watch | ||
|
||
Watch and compile the Strapi plugin for local development. | ||
|
||
```bash | ||
strapi plugin:watch | ||
``` | ||
|
||
| Option | Type | Description | Default | | ||
| ------------- | :--: | -------------------------------------------------------- |---------| | ||
| `-d, --debug` | - | Enable debugging mode with verbose logs | false | | ||
| `--silent` | - | Do not log anything | false | | ||
|
||
## strapi plugin:verify | ||
|
||
Verify the output of the plugin before publishing it. | ||
|
||
```bash | ||
strapi plugin:verify | ||
``` | ||
|
||
| Option | Type | Description | Default | | ||
| ------------- | :--: | -------------------------------------------------------- | --------| | ||
| `-d, --debug` | - | Enable debugging mode with verbose logs | false | | ||
| `--silent` | - | Do not log anything | false | |
Oops, something went wrong.