d2l-hypermedia-constants
Version:
Library of constants for communicating with D2L's Hypermedia APIs
52 lines (36 loc) • 1.5 kB
Markdown
Library of constants useful when using hypermedia.
`d2l-hypermedia-constants` can be installed from NPM:
```shell
npm install --save d2l-hypermedia-constants
```
```js
const hypermediaConstants = require('d2l-hypermedia-constants');
console.log(hypermediaConstants.Actions);
console.log(hypermediaConstants.Classes);
console.log(hypermediaConstants.Rels);
```
```js
import {Actions, Classes, Rels} from 'd2l-hypermedia-constants';
console.log(Actions);
console.log(Classes);
console.log(Rels);
```
```html
<script type="module" src="../d2l-hypermedia-constants/d2l-hypermedia-constants.js"></script>
<script>
console.log(D2L.Hypermedia.Actions);
console.log(D2L.Hypermedia.Classes);
console.log(D2L.Hypermedia.Rels);
</script>
```
The [incremental-release GitHub Action](https://github.com/BrightspaceUI/actions/tree/main/incremental-release) is called from the `release.yml` GitHub Action workflow to handle version changes and releasing.
When a PR is merged, a minor version bump will happen automatically, a release will be created, and the new version will be published to NPM.
See the [Best Practices & Style Guide](https://github.com/Brightspace/valence-ui-docs/wiki/Best-Practices-&-Style-Guide) for information on naming conventions, plus information about the [EditorConfig](http://editorconfig.org) rules used in this repo.