@digipolis-gent/opening-hours-widget

A wrapper for the opening-hours API for stad.gent

Usage no npm install needed!

<script type="module">
  import digipolisGentOpeningHoursWidget from 'https://cdn.skypack.dev/@digipolis-gent/opening-hours-widget';
</script>

README

Opening Hours Widget

This library serves as a wrapper for the openingsuren.gent.be API.

Installation

Install the dependencies:

npm install @digipolis-gent/opening-hours-widget

Usage

CommonJS

const OpeningHoursWidget = require('@digipolis-gent/opening-hours-widget').default;

let ohw = new OpeningHoursWidget(options);

ES Imports

import OpeningHoursWidget from '@digipolis-gent/opening-hours-widget';

let ohw = new OpeningHoursWidget(options);

Browser

HTML:

<script src="node_modules/@digipolis-gent/opening-hours-widget/dist/opening-hours-widget.js"></script>

JS:

let ohw = new OpeningHoursWidget(options);

Development

Setup

If you'd like to make adjustments to the source code, you can set up this project locally.

To clone the repo and install dependencies:

$ git clone git@github.com:StadGent/npm_package_opening-hours-widget.git
$ cd npm_package_opening-hours-widget
$ npm install

Watch

This will run tests on files every time a change is saved.

$ npm start

Test

We use Jest for testing.

$ npm test

will run all tests.

Built With

Contributing

Thanks for your interest in contributing! Get started here.

Authors

  • Helena Standaert - Initial work - GitHub
  • Bart Delrue - Contribution - GitHub