@@ -6,14 +6,14 @@ Initialize a new WordPress package or init wpm in existing project
66
77### Options
88
9- | Name | Type | Default | Description |
10- | :--------------| :---------| :--------| :---------------------------------------- |
11- | ` --existing ` | ` bool ` | | Init wpm.json for an existing project |
12- | ` --license ` | ` string ` | | Package license |
13- | ` --name ` | ` string ` | | Package name |
14- | ` --type ` | ` string ` | | Package type (plugin, theme, mu-plugin) |
15- | ` --version ` | ` string ` | | Semver-compliant version |
16- | ` -y ` , ` --yes ` | ` bool ` | | Skip prompts and use default values |
9+ | Name | Type | Default | Description |
10+ | :--------------| :---------| :--------| :--------------------------------------|
11+ | ` --existing ` | ` bool ` | | Init wpm.json for an existing project |
12+ | ` --license ` | ` string ` | | Package license |
13+ | ` --name ` | ` string ` | | Package name |
14+ | ` --type ` | ` string ` | | Package type (plugin, theme) |
15+ | ` --version ` | ` string ` | | Semver-compliant version |
16+ | ` -y ` , ` --yes ` | ` bool ` | | Skip prompts and use default values |
1717
1818
1919<!-- -MARKER_GEN_END-->
@@ -69,7 +69,7 @@ automatically so the command can run without interaction.
6969> When you run ` wpm init -y ` without ` --type ` , the ` type ` field is left
7070> unset. Validation is skipped for that field in the ` -y ` path, so the command
7171> succeeds, but you will need to set ` type ` manually before publishing. Prefer
72- > ` wpm init -y --type plugin ` (or ` theme ` , ` mu-plugin ` ) when scripting.
72+ > ` wpm init -y --type plugin ` (or ` theme ` ) when scripting.
7373
7474### Existing project mode (` --existing ` )
7575
@@ -89,19 +89,19 @@ Detection rules:
8989
9090Fields populated from the project sources:
9191
92- | wpm.json field | Source |
93- | :------------- | :--------------------------------------------------------- |
94- | ` name ` | current directory name (override with ` --name ` ) |
95- | ` type ` | auto-detected (override with ` --type ` ) |
96- | ` version ` | plugin header ` Version ` or theme header ` Version ` |
97- | ` description ` | header ` Description ` , falling back to ` readme.txt ` |
98- | ` license ` | header ` License ` , falling back to ` readme.txt ` ` License ` |
99- | ` homepage ` | header ` Plugin URI ` or ` Theme URI ` (must be http/https) |
100- | ` author ` | plugin or theme header ` Author ` |
101- | ` tags ` | ` readme.txt ` Tags, falling back to header ` Tags ` |
102- | ` requires.wp ` | header ` Requires at least ` and ` readme.txt ` Requires |
103- | ` requires.php ` | header ` Requires PHP ` and ` readme.txt ` Requires PHP |
104- | ` dependencies ` | header ` Requires Plugins ` (each pinned to ` * ` ) |
92+ | wpm.json field | Source |
93+ | :------------- | :------------------------------------------------------- |
94+ | ` name ` | current directory name (override with ` --name ` ) |
95+ | ` type ` | auto-detected (override with ` --type ` ) |
96+ | ` version ` | plugin header ` Version ` or theme header ` Version ` |
97+ | ` description ` | header ` Description ` , falling back to ` readme.txt ` |
98+ | ` license ` | header ` License ` , falling back to ` readme.txt ` ` License ` |
99+ | ` homepage ` | header ` Plugin URI ` or ` Theme URI ` (must be http/https) |
100+ | ` author ` | plugin or theme header ` Author ` |
101+ | ` tags ` | ` readme.txt ` Tags, falling back to header ` Tags ` |
102+ | ` requires.wp ` | header ` Requires at least ` and ` readme.txt ` Requires |
103+ | ` requires.php ` | header ` Requires PHP ` and ` readme.txt ` Requires PHP |
104+ | ` dependencies ` | header ` Requires Plugins ` (each pinned to ` * ` ) |
105105
106106If a ` readme.txt ` exists but no ` readme.md ` , wpm also converts the
107107WordPress.org-flavored ` readme.txt ` into a Markdown ` readme.md ` next to it.
@@ -114,8 +114,8 @@ Constraints applied automatically:
114114- ` description ` is trimmed to at most 512 characters, preferring to cut at a
115115 sentence boundary.
116116- ` license ` is cleared if it falls outside 3 to 100 characters.
117- - ` dependencies ` from ` Requires Plugins ` are capped at 16, and any self-reference
118- is dropped.
117+ - ` dependencies ` from ` Requires Plugins ` are capped at 16, and any
118+ self-reference is dropped.
119119- ` requires.wp ` becomes ` >=X ` (and ` <=Y ` when ` Tested up to ` is also present and
120120 different from ` Requires ` ).
121121- ` requires.php ` becomes ` >=X ` .
0 commit comments