Skip to content
Public template

Latest commit

 

History

193 Commits

Folders and files

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],
});

Import the plugin's global TypeScript definitions:

import 'kaplay-plugin-template/global';

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>

Use the plugin:

k.example();

Release

Release is automated with Release Please.

License

MIT

Releases

Sponsor this project

Packages

Used by

Contributors

Languages