Skip to content

Commit

Permalink
update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
aayushRedHat committed Jan 18, 2024
1 parent 111966d commit c60dff9
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions docs/using-private-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
title: "Using private templates"
weight: 180
---
Generator allows to fetch the template from the private repositories like verdaccio, nexus, npm etc.
Generator allows fetching the template from private repositories like Verdaccio, Nexus, npm, etc.


## Private registry options
## Private registry options:

* **registry.url**: The URL of the registry where is private template is present. Defaults to `registry.npmjs.org`.
* **registry.auth**: Optional parameter to pass npm registry username and password encoded with base64, formatted like `username:password`. For example if the username and password is `admin` and `nimda`, you need to encode with base64 value like `admin:nimda` which results in `YWRtaW46bmltZGE=`.
* **registry.token** : Optional parameter to pass to npm registry auth token. To get the token you can first authenticate with registry using `npm login` and then grab generated token from `.npmrc` file.
* **registry.url**: The URL of the registry where the private template is located. Defaults to `registry.npmjs.org`.
* **registry.auth**: An optional parameter to pass the npm registry username and password encoded with base64, formatted as `username:password`. For example, if the username and password are `admin` and `nimda`, you need to encode them with the base64 value like `admin:nimda` which results in `YWRtaW46bmltZGE=`.
**registry.token**: An optional parameter to pass to the npm registry authentication token. To get the token, you can first authenticate with the registry using `npm login` and then grab the generated token from the `.npmrc` file.

## Pulling private template using library
## Pulling private template using library:

```javascript
const generator = new Generator('@asyncapi/html-template', 'output',
Expand All @@ -26,4 +26,4 @@ const generator = new Generator('@asyncapi/html-template', 'output',
}
});
```
Let's assume you host `@asyncapi/html-template` in private package registry like Verdaccio. In order to pull this template you need to provide `registry.url` option that points to the registry URL and `registry.auth` as base64 encoded value that represents username and password. Instead of username and password you can also pass `registry.token`.
Assuming you host `@asyncapi/html-template` in a private package registry like Verdaccio. To pull this template, you need to provide `registry.url` option that points to the registry URL and `registry.auth` as a base64 encoded value that represents the username and password. Instead of username and password, you can also pass `registry.token`.

0 comments on commit c60dff9

Please sign in to comment.