0.2.0 • Published 2 years ago
@digipolis-gent/opening-hours-widget v0.2.0
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-widgetUsage
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 installWatch
This will run tests on files every time a change is saved.
$ npm startTest
We use Jest for testing.
$ npm testwill 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.