0.1.1 • Published 12 months ago

@mebble/medley v0.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

medley

CI Status NPM

Table of Contents

Usage

import { MedleyConfig, startTimer } from "@mebble/medley";

const config: MedleyConfig = {
    name: 'Shoulder stretches',
    timer: {
        type: 'sequence',
        of: [{
            type: 'loop',
            times: 2,
            of: {
                type: 'sequence',
                of: [
                    { type: 'unit', name: 'Left shoulder', duration: 30 },
                    { type: 'unit', name: 'Rest', duration: 10 },
                    { type: 'unit', name: 'Right shoulder', duration: 30 },
                    { type: 'unit', name: 'Rest', duration: 10 },
                ]
            }
        }, {
            type: 'unit',
            name: 'Rest',
            duration: 30
        }]
    }
};

startTimer(config, event => {
    console.log(event)
});

Installation

Using a package manager

Install with any one of the following package managers:

npm install @mebble/medley
yarn add @mebble/medley
pnpm add @mebble/medley

Using a CDN

If your JS code is placed within a <script type="module">, you can import as an ES module from a CDN:

<script type="module">
    import medley from 'https://esm.sh/@mebble/medley';
</script>

Alternatively, you can import the bundle:

<script src="https://cdn.jsdelivr.net/npm/@mebble/medley@latest/dist/index.umd.js"></script>

Here, the library will be available as the global variable medley.

API Reference

The API reference is available on the website.

Contributing

See the contribution guide at CONTRIBUTING.md.

0.1.1

12 months ago

0.1.0

12 months ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.1

1 year ago