https://github.com/brightspace/d2l-hypermedia-constants
https://github.com/brightspace/d2l-hypermedia-constants
browser polymer web-components
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/brightspace/d2l-hypermedia-constants
- Owner: Brightspace
- License: apache-2.0
- Created: 2017-03-14T18:59:20.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2025-03-27T20:53:56.000Z (about 1 year ago)
- Last Synced: 2025-04-06T10:01:57.653Z (about 1 year ago)
- Topics: browser, polymer, web-components
- Language: JavaScript
- Size: 302 KB
- Stars: 2
- Watchers: 64
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# d2l-hypermedia-constants
Library of constants useful when using hypermedia.
## Installation
`d2l-hypermedia-constants` can be installed from NPM:
```shell
npm install --save d2l-hypermedia-constants
```
## Usage
### Node.js
```js
const hypermediaConstants = require('d2l-hypermedia-constants');
console.log(hypermediaConstants.Actions);
console.log(hypermediaConstants.Classes);
console.log(hypermediaConstants.Rels);
```
### ES6 Module Import
```js
import {Actions, Classes, Rels} from 'd2l-hypermedia-constants';
console.log(Actions);
console.log(Classes);
console.log(Rels);
```
### ES6 Module Global
```html
console.log(D2L.Hypermedia.Actions);
console.log(D2L.Hypermedia.Classes);
console.log(D2L.Hypermedia.Rels);
```
## Versioning & Releasing
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.
## Coding styles
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.