Skip to content

Commit cb98886

Browse files
Update build-utils docs (#139)
* Update build-utils docs * Update README.md
1 parent 56a32f1 commit cb98886

File tree

1 file changed

+19
-203
lines changed

1 file changed

+19
-203
lines changed

tools/build-utils/README.md

+19-203
Original file line numberDiff line numberDiff line change
@@ -1,241 +1,57 @@
1-
# @wpsocio/wpdev
1+
# @wpsocio/build-utils
22

3-
A CLI to manage WordPress projects in a monorepo or a standalone repo.
4-
5-
## Requirements
6-
7-
- [WP CLI](https://wp-cli.org/) - Required for i18n features.
3+
Build utilities CLI.
84

95
## Installation
106

117
```sh
12-
npm install --save-dev @wpsocio/wpdev
8+
npm install --save-dev @wpsocio/build-utils
139
```
1410

1511
```sh
16-
yarn add --dev @wpsocio/wpdev
12+
yarn add --dev @wpsocio/build-utils
1713
```
1814

1915
```sh
20-
pnpm add -D @wpsocio/wpdev
16+
pnpm add -D @wpsocio/build-utils
2117
```
2218

2319
## Usage
2420

2521
<!-- usage -->
22+
2623
```sh-session
27-
$ npm install -g @wpsocio/wpdev
28-
$ wpdev COMMAND
24+
$ npm install -g @wpsocio/build-utils
25+
$ build-utils COMMAND
2926
running command...
30-
$ wpdev (--version)
31-
@wpsocio/wpdev/1.0.7 linux-x64 node-v20.15.0
32-
$ wpdev --help [COMMAND]
27+
$ build-utils (--version)
28+
@wpsocio/build-utils/0.0.0 darwin-arm64 node-v18.19.0
29+
$ build-utils --help [COMMAND]
3330
USAGE
34-
$ wpdev COMMAND
31+
$ build-utils COMMAND
3532
...
3633
```
34+
3735
<!-- usagestop -->
3836

3937
## Commands
4038

4139
<!-- commands -->
42-
* [`wpdev bundle [PROJECTS]`](#wpdev-bundle-projects)
43-
* [`wpdev clean [PATH]`](#wpdev-clean-path)
44-
* [`wpdev link [PROJECTS]`](#wpdev-link-projects)
45-
* [`wpdev project-info [PROJECTS]`](#wpdev-project-info-projects)
46-
* [`wpdev unlink [PROJECTS]`](#wpdev-unlink-projects)
47-
48-
## `wpdev bundle [PROJECTS]`
49-
50-
Prepares and bundles projects for distribution or deployment.
51-
52-
```
53-
USAGE
54-
$ wpdev bundle [PROJECTS] [-r <value>] [-m wp-monorepo|standalone] [--project-types plugins|themes] [-e
55-
<value>] [--all] [--from-changeset --changeset-json <value>] [-d <value>] [-p npm|yarn|pnpm|bun] [-c] [-v <value> |
56-
-t major|minor|patch|premajor|preminor|prepatch|prerelease] [--tasks <value>]
57-
58-
ARGUMENTS
59-
PROJECTS Project(s) to target.
60-
61-
FLAGS
62-
-c, --[no-]archive Create a compressed archive (zip) of the bundled project.
63-
-d, --out-dir=<value> [default: dist] Path to the output directory. Defaults to "dist".
64-
-e, --env-file=<value>... Environment file(s) to load
65-
-m, --operation-mode=<option> Operation mode.
66-
<options: wp-monorepo|standalone>
67-
-p, --package-manager=<option> [default: npm] Package manager to use.
68-
<options: npm|yarn|pnpm|bun>
69-
-r, --root-dir=<value> Root directory. Can be an absolute or a relative path.
70-
-t, --release-type=<option> Release type to update to.
71-
<options: major|minor|patch|premajor|preminor|prepatch|prerelease>
72-
-v, --version=<value> Version to update to.
73-
--all Target all projects in monorepo.
74-
--changeset-json=<value> Path to the changeset status JSON file. Pass the {filePath} given to `changeset
75-
status --output={filePath}`
76-
--from-changeset Target projects in monorepo from changesets.
77-
--project-types=<option>... Project types managed in the monorepo. Only used in wp-monorepo mode.
78-
<options: plugins|themes>
79-
--tasks=<value> Run only the specified tasks. Comma-separated list.
80-
81-
DESCRIPTION
82-
Prepares and bundles projects for distribution or deployment.
83-
84-
EXAMPLES
85-
$ wpdev bundle
86-
87-
$ wpdev bundle wptelegram test-theme
88-
89-
$ wpdev bundle --all
90-
```
91-
92-
_See code: [src/commands/bundle.ts](https://github.com/wpsocio/wp-projects/blob/@wpsocio/[email protected]/tools/wpdev/src/commands/bundle.ts)_
93-
94-
## `wpdev clean [PATH]`
95-
96-
Cleans up the given path(s) in this monorepo.
97-
98-
```
99-
USAGE
100-
$ wpdev clean [PATH] [-r <value>] [-m wp-monorepo|standalone] [--project-types plugins|themes] [-e
101-
<value>] [-i ignored|node_modules|composer.lock|vendor] [--all]
102-
103-
ARGUMENTS
104-
PATH Path to clean. Relative to root directory
105-
106-
FLAGS
107-
-e, --env-file=<value>... Environment file(s) to load
108-
-i, --include=<option>... Type of files to delete
109-
<options: ignored|node_modules|composer.lock|vendor>
110-
-m, --operation-mode=<option> Operation mode.
111-
<options: wp-monorepo|standalone>
112-
-r, --root-dir=<value> Root directory. Can be an absolute or a relative path.
113-
--all Clean everything
114-
--project-types=<option>... Project types managed in the monorepo. Only used in wp-monorepo mode.
115-
<options: plugins|themes>
116-
117-
DESCRIPTION
118-
Cleans up the given path(s) in this monorepo.
119-
120-
EXAMPLES
121-
$ wpdev clean plugins/wptelegram --include=ignored --include=node_modules
122-
123-
$ wpdev clean --all
124-
```
12540

126-
_See code: [src/commands/clean.ts](https://github.com/wpsocio/wp-projects/blob/@wpsocio/[email protected]/tools/wpdev/src/commands/clean.ts)_
41+
- [`build-utils validate`](#build-utils-validate)
12742

128-
## `wpdev link [PROJECTS]`
43+
## `build-utils validate`
12944

130-
Creates symlinks in the given wp-content directory for the project(s) in this monorepo.
45+
Validates build output files.
13146

13247
```
13348
USAGE
134-
$ wpdev link [PROJECTS] [-r <value>] [-m wp-monorepo|standalone] [--project-types plugins|themes] [-e
135-
<value>] [--all] [--from-changeset --changeset-json <value>] [-d <value>]
136-
137-
ARGUMENTS
138-
PROJECTS Project(s) to target.
139-
140-
FLAGS
141-
-d, --wp-content-dir=<value> Path to the WordPress content directory.
142-
-e, --env-file=<value>... Environment file(s) to load
143-
-m, --operation-mode=<option> Operation mode.
144-
<options: wp-monorepo|standalone>
145-
-r, --root-dir=<value> Root directory. Can be an absolute or a relative path.
146-
--all Target all projects in monorepo.
147-
--changeset-json=<value> Path to the changeset status JSON file. Pass the {filePath} given to `changeset
148-
status --output={filePath}`
149-
--from-changeset Target projects in monorepo from changesets.
150-
--project-types=<option>... Project types managed in the monorepo. Only used in wp-monorepo mode.
151-
<options: plugins|themes>
49+
$ build-utils validate
15250
15351
DESCRIPTION
154-
Creates symlinks in the given wp-content directory for the project(s) in this monorepo.
155-
156-
EXAMPLES
157-
$ wpdev link
158-
159-
$ wpdev link wptelegram test-theme
160-
161-
$ wpdev link --all
162-
```
163-
164-
_See code: [src/commands/link.ts](https://github.com/wpsocio/wp-projects/blob/@wpsocio/[email protected]/tools/wpdev/src/commands/link.ts)_
165-
166-
## `wpdev project-info [PROJECTS]`
167-
168-
Get the project info as JSON.
169-
170-
```
171-
USAGE
172-
$ wpdev project-info [PROJECTS] [-r <value>] [-m wp-monorepo|standalone] [--project-types plugins|themes] [-e
173-
<value>] [--all] [--from-changeset --changeset-json <value>] [--pretty]
174-
175-
ARGUMENTS
176-
PROJECTS Project(s) to target.
177-
178-
FLAGS
179-
-e, --env-file=<value>... Environment file(s) to load
180-
-m, --operation-mode=<option> Operation mode.
181-
<options: wp-monorepo|standalone>
182-
-r, --root-dir=<value> Root directory. Can be an absolute or a relative path.
183-
--all Target all projects in monorepo.
184-
--changeset-json=<value> Path to the changeset status JSON file. Pass the {filePath} given to `changeset
185-
status --output={filePath}`
186-
--from-changeset Target projects in monorepo from changesets.
187-
--pretty Pretty print the JSON output.
188-
--project-types=<option>... Project types managed in the monorepo. Only used in wp-monorepo mode.
189-
<options: plugins|themes>
190-
191-
DESCRIPTION
192-
Get the project info as JSON.
193-
194-
EXAMPLES
195-
$ wpdev project-info
196-
197-
$ wpdev project-info wptelegram test-theme
198-
199-
$ wpdev project-info --all
52+
Validates build output files.
20053
```
20154

202-
_See code: [src/commands/project-info.ts](https://github.com/wpsocio/wp-projects/blob/@wpsocio/[email protected]/tools/wpdev/src/commands/project-info.ts)_
203-
204-
## `wpdev unlink [PROJECTS]`
205-
206-
Removes symlinks in the given wp-content directory created for the project(s) in this monorepo.
207-
208-
```
209-
USAGE
210-
$ wpdev unlink [PROJECTS] [-r <value>] [-m wp-monorepo|standalone] [--project-types plugins|themes] [-e
211-
<value>] [--all] [--from-changeset --changeset-json <value>] [-d <value>]
212-
213-
ARGUMENTS
214-
PROJECTS Project(s) to target.
215-
216-
FLAGS
217-
-d, --wp-content-dir=<value> Path to the WordPress content directory.
218-
-e, --env-file=<value>... Environment file(s) to load
219-
-m, --operation-mode=<option> Operation mode.
220-
<options: wp-monorepo|standalone>
221-
-r, --root-dir=<value> Root directory. Can be an absolute or a relative path.
222-
--all Target all projects in monorepo.
223-
--changeset-json=<value> Path to the changeset status JSON file. Pass the {filePath} given to `changeset
224-
status --output={filePath}`
225-
--from-changeset Target projects in monorepo from changesets.
226-
--project-types=<option>... Project types managed in the monorepo. Only used in wp-monorepo mode.
227-
<options: plugins|themes>
228-
229-
DESCRIPTION
230-
Removes symlinks in the given wp-content directory created for the project(s) in this monorepo.
231-
232-
EXAMPLES
233-
$ wpdev unlink
234-
235-
$ wpdev unlink wptelegram test-theme
236-
237-
$ wpdev unlink --all
238-
```
55+
_See code: [src/commands/validate.ts](https://github.com/wpsocio/wp-projects/blob/@wpsocio/[email protected]/tools/build-utils/src/commands/validate.ts)_
23956

240-
_See code: [src/commands/unlink.ts](https://github.com/wpsocio/wp-projects/blob/@wpsocio/[email protected]/tools/wpdev/src/commands/unlink.ts)_
24157
<!-- commandsstop -->

0 commit comments

Comments
 (0)