Skip to content

Commit

Permalink
docs(web components): add doc about versionning
Browse files Browse the repository at this point in the history
  • Loading branch information
tkohr committed Aug 11, 2023
1 parent e28c756 commit d64d4f6
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apps/webcomponents/README.md
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ All Web Components are prefixed with `gn-`.
Web Components are made to be easily included in any context, e.g.:

```html
<script src="https://cdn.jsdelivr.net/gh/geonetwork/geonetwork-ui@wc-dist/gn-wc.js"></script>
<script src="https://cdn.jsdelivr.net/gh/geonetwork/geonetwork-ui@wc-dist-main/gn-wc.js"></script>
...
<gn-results-list
api-url="https://apps.titellus.net/geonetwork/srv/api"
8 changes: 7 additions & 1 deletion docs/guide/webcomponents.md
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ Web Components are made to be easily included in any context. To do so, you have
- include your Web Component in the HTML content.

```html
<script src="https://cdn.jsdelivr.net/gh/geonetwork/geonetwork-ui@wc-dist/gn-wc.js"></script>
<script src="https://cdn.jsdelivr.net/gh/geonetwork/geonetwork-ui@wc-dist-v1.1.0/gn-wc.js"></script>
...
<gn-results-list
api-url="https://dev.geo2france.fr/geonetwork/srv/api"
@@ -31,6 +31,12 @@ Web Components are made to be easily included in any context. To do so, you have
></gn-results-list>
```

## Publication and Versioning

The Web Component script is automatically built upon merges on main and for releases. These builds are made available via a jsdelivr CDN, which points at `wc-dist` branches in the github repository. There is a `wc-dist` branch for every release tag > `v1.1.0` as well as `wc-dist-main`.

You can choose the version of the Web Component script you wish to use by indicating the corresponding value in the script's URL e.g. `wc-dist-v1.1.0`.

## Build

All Angular custom elements are served by the same application `webcomponents`.

0 comments on commit d64d4f6

Please sign in to comment.