You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: website/docs/components/publishing-to-a-registry.md
+265-6Lines changed: 265 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -4,14 +4,273 @@ sidebar_position: 5
4
4
5
5
# Publishing to a registry
6
6
7
-
You will need an online registry connected to a library to do that. The only requisite is that a component with the same name and version cannot be already existing on that registry.
7
+
Publishing components to an OpenComponents registry makes them available for consumption across your applications. This guide covers the complete publishing workflow, from basic commands to advanced scenarios and troubleshooting.
8
+
9
+
## Overview
10
+
11
+
Publishing is the process of uploading your packaged component to a registry where it becomes available for consumption. When you publish a component:
12
+
13
+
1.**Packaging**: Your component is compiled and packaged with all dependencies
14
+
2.**Validation**: The registry validates the component structure, CLI version, and custom rules
15
+
3.**Storage**: The component is stored in the registry's storage backend
16
+
4.**Availability**: The component becomes accessible via HTTP endpoints
17
+
18
+
## Prerequisites
19
+
20
+
Before publishing components, ensure you have:
21
+
22
+
- An OpenComponents registry set up and accessible
23
+
- A properly structured component with valid `package.json`
24
+
- Registry credentials (if authentication is required)
25
+
- Compatible CLI and Node.js versions
26
+
27
+
## Basic Publishing Workflow
28
+
29
+
### 1. Add Registry
30
+
31
+
First, configure your registry (only needed once):
32
+
33
+
```sh
34
+
oc registry add https://your-registry-domain.com
35
+
```
36
+
37
+
### 2. Publish Component
38
+
39
+
Navigate to your component directory and publish:
40
+
41
+
```sh
42
+
oc publish my-component/
43
+
```
44
+
45
+
This command will:
46
+
47
+
- Package your component automatically
48
+
- Compress it for upload
49
+
- Upload to all configured registries
50
+
- Make it available at `https://your-registry-domain.com/my-component`
51
+
52
+
## Authentication
53
+
54
+
### Interactive Authentication
55
+
56
+
If the registry requires authentication, you'll be prompted for credentials:
57
+
58
+
```sh
59
+
oc publish my-component/
60
+
# Registry requires authentication
61
+
# Username: your-username
62
+
# Password: [hidden input]
63
+
```
64
+
65
+
### Command-line Authentication
66
+
67
+
Provide credentials directly via command-line options:
0 commit comments