Skip to content

Commit fe59b26

Browse files
add validate command info
1 parent 30fcb86 commit fe59b26

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

website/docs/components/cli.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ oc preview http://localhost:3030/my-component
8686
# Add registry (one-time setup)
8787
oc registry add https://my-registry.com
8888

89+
# Validate component before publishing
90+
oc validate my-component/
91+
8992
# Package and publish
9093
oc publish my-component --username=myuser --password=mypass
9194

@@ -113,6 +116,7 @@ oc mock plugin hash "test-value"
113116
- `oc init <name>` - Create new component
114117
- `oc dev . <port>` - Start development server
115118
- `oc preview <url>` - Preview component
119+
- `oc validate <path>` - Validate component against registry requirements
116120
- `oc publish <path>` - Publish component
117121

118122
### Setup Commands (One-time)
@@ -133,6 +137,7 @@ oc mock plugin hash "test-value"
133137
| `init` | Create component | `oc init header` |
134138
| `dev` | Start dev server | `oc dev . 3030` |
135139
| `preview` | Test component | `oc preview http://localhost:3030/header` |
140+
| `validate` | Validate component | `oc validate header/` |
136141
| `publish` | Deploy component | `oc publish header/` |
137142
| `registry add` | Add registry | `oc registry add https://my-registry.com` |
138143
| `clean` | Remove node_modules | `oc clean . --yes` |
@@ -338,6 +343,44 @@ $ oc preview "http://localhost:3000/my-new-component/1.0.0/?param1=hello&name=Ar
338343

339344
---
340345

346+
### validate
347+
348+
Validate a component against registry requirements without publishing
349+
350+
#### Usage:
351+
352+
```sh
353+
$ oc validate <componentPath> [options]
354+
```
355+
356+
#### Parameters:
357+
358+
| Name | Description | Default |
359+
| --------------- | ------------------------------------- | ------- |
360+
| `componentPath` | The path of the component to validate | |
361+
362+
#### Options:
363+
364+
| Name | Description | Default |
365+
| --------------- | ----------------------------------------------------------------- | ------- |
366+
| `--skipPackage` | Skip packaging step and validate existing `_package/package.json` | false |
367+
| `--registries` | Override registries from `oc.json` with custom list | |
368+
369+
#### Examples:
370+
371+
```sh
372+
# Validate component against configured registries
373+
$ oc validate my-component/
374+
375+
# Validate without packaging (uses existing _package/package.json)
376+
$ oc validate my-component/ --skipPackage
377+
378+
# Validate against specific registries
379+
$ oc validate my-component/ --registries http://registry1.com/ http://registry2.com/
380+
```
381+
382+
---
383+
341384
### publish
342385

343386
Publish a component

0 commit comments

Comments
 (0)