@digipolis-gent/opening-hours-widget
v0.2.0
Published
A wrapper for the opening-hours API for stad.gent
Downloads
56
Maintainers
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 [email protected]: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
- EcmaScript 2017 : The programming language used
- Babel : JavaScript Transpiler
- NPM : Dependency Management
Contributing
Thanks for your interest in contributing! Get started here.