Skip to content

remarkablegames/kaplay-plugin-template

Repository files navigation

kaplay-plugin-template

NPM

NPM version build codecov

Kaplay Plugin Template

Prerequisites

Install kaplay:

npm install kaplay

Install

NPM:

npm install kaplay-plugin-template

CDN:

<script src="https://unpkg.com/kaplay-plugin-template@latest/dist/plugin.umd.js"></script>

Usage

Import the plugin:

import kaplay from 'kaplay';
import { examplePlugin } from 'kaplay-plugin-template';

const k = kaplay({
  plugins: [examplePlugin],
});

Use the plugin:

k.example();

To load the plugin using a script:

<script src="https://unpkg.com/kaplay@latest/dist/kaplay.js"></script>
<script src="https://unpkg.com/kaplay-plugin-template@latest/dist/plugin.umd.js"></script>

<script>
  const k = kaplay({
    plugins: [KaplayPluginTemplate.examplePlugin],
  });

  k.example();
</script>

Release

Release is automated with Release Please.

License

MIT