Skip to content

Commit 3db752f

Browse files
link more stuff in between
1 parent 38f2f16 commit 3db752f

File tree

2 files changed

+11
-126
lines changed

2 files changed

+11
-126
lines changed

website/docs/components/publishing-to-a-registry.md

Lines changed: 7 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,13 @@ Publishing is the process of uploading your packaged component to a registry whe
1717

1818
## Prerequisites
1919

20-
Before publishing components, ensure you have:
20+
Publishing assumes:
2121

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
22+
1. A reachable registry (see [Registry Configuration](../registry/registry-configuration))
23+
2. A component folder that passes `oc dev` validation
24+
3. OC CLI installed (see [CLI install](cli.md#install-the-cli))
25+
26+
That's all you need—no extra global setup.
2627

2728
## Basic Publishing Workflow
2829

@@ -174,79 +175,7 @@ This validates your component and simulates the publish process without actually
174175

175176
## Troubleshooting
176177

177-
### Common Errors
178-
179-
**Unauthorized (401)**
180-
181-
```
182-
Error: Unauthorized
183-
```
184-
185-
**Solution**: Provide valid credentials using `--username` and `--password` options, or ensure your authentication is properly configured.
186-
187-
**Component Already Exists**
188-
189-
```
190-
Error: Component already exists: [email protected]
191-
```
192-
193-
**Solution**: Update the version in your `package.json` file before publishing.
194-
195-
**CLI Version Mismatch**
196-
197-
```
198-
Error: OC CLI version needs upgrade
199-
```
200-
201-
**Solution**: Update your CLI to the required version:
202-
203-
```sh
204-
npm install -g oc@latest
205-
```
206-
207-
**Node Version Incompatibility**
208-
209-
```
210-
Error: Node CLI version needs upgrade
211-
```
212-
213-
**Solution**: Update Node.js to a compatible version as specified in the error message.
214-
215-
**Invalid Component Name**
216-
217-
```
218-
Error: Component name not valid
219-
```
220-
221-
**Solution**: Ensure your component name follows naming conventions (lowercase, no spaces, valid npm package name format).
222-
223-
**Invalid Component Version**
224-
225-
```
226-
Error: Component version not valid
227-
```
228-
229-
**Solution**: Use semantic versioning (e.g., "1.0.0", "2.1.3") in your `package.json`.
230-
231-
**Package Validation Failed**
232-
233-
```
234-
Error: Package is not valid
235-
```
236-
237-
**Solution**: Check that your component has:
238-
239-
- Valid `package.json` with required `oc` configuration
240-
- All required files (template, server.js if needed)
241-
- Proper component structure
242-
243-
**Template Version Incompatibility**
244-
245-
```
246-
Error: Your template requires a version of OC higher than X.X.X
247-
```
248-
249-
**Solution**: Either upgrade your registry or downgrade your template requirements.
178+
For error messages and advanced diagnostics, refer to the [CLI Troubleshooting Guide](cli.md#installation-troubleshooting). It covers authentication, versioning, validation failures, and more.
250179

251180
### Debugging Tips
252181

website/docs/intro.md

Lines changed: 4 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -203,58 +203,14 @@ See the dedicated [CLI guide](components/cli#install-the-cli) for installation,
203203

204204
# Setup a library
205205

206-
At the moment the only supported libraries are Amazon S3 & Google Storage.
206+
See detailed guides for:
207207

208-
- S3 - Create an account and for S3 get the API credentials; you will need them while setting up the registry.
209-
- Google Storage - Create an account and setup your [gcloud](https://cloud.google.com/sdk/docs/#install_the_latest_cloud_tools_version_cloudsdk_current_version) cli.
208+
- [S3 library adapter](registry/registry-configuration#s3)
209+
- [Google Cloud Storage adapter](registry/registry-using-google-storage)
210210

211211
# Setup a registry
212212

213-
The registry is a node.js express app that serves the components. You can have multiple registries connected to a library, but you can't have multiple libraries connected to a registry.
214-
First, create a dir and install oc:
215-
216-
```sh
217-
mkdir oc-registry && cd oc-registry
218-
npm init
219-
npm install oc --save
220-
```
221-
222-
For Google Storage registry configuration's documentation, [look at this page](/docs/registry/registry-using-google-storage).
223-
224-
Then on the entry point, what you need on an `index.js` file is:
225-
226-
```js
227-
var oc = require("oc");
228-
229-
var configuration = {
230-
verbosity: 0,
231-
baseUrl: "https://my-components-registry.mydomain.com/",
232-
port: 3000,
233-
tempDir: "./temp/",
234-
refreshInterval: 600,
235-
pollingInterval: 5,
236-
s3: {
237-
key: "your-s3-key",
238-
secret: "your-s3-secret",
239-
bucket: "your-s3-bucket",
240-
region: "your-s3-region",
241-
path: "//s3.amazonaws.com/your-s3-bucket/",
242-
componentsDir: "components",
243-
},
244-
env: { name: "production" },
245-
};
246-
247-
var registry = oc.Registry(configuration);
248-
249-
registry.start(function (err, app) {
250-
if (err) {
251-
console.log("Registry not started: ", err);
252-
process.exit(1);
253-
}
254-
});
255-
```
256-
257-
For the registry configuration's documentation, [look at this page](/docs/registry/registry-configuration).
213+
A full configuration reference and production-ready examples live in [Registry Configuration](registry/registry-configuration). Start there when you need to spin up your first registry.
258214

259215
## What Should I Read Next?
260216

0 commit comments

Comments
 (0)