snitchy-kapla-plugin

Add prefixes (`$el`, `$ref`) and triggers for Kapla(https://github.com/thierrymichel/kapla) components

Usage no npm install needed!

<script type="module">
  import snitchyKaplaPlugin from 'https://cdn.skypack.dev/snitchy-kapla-plugin';
</script>

README

📈 Snitchy Kapla Plugin

stability-wip NPM version Coverage Status License

Add prefixes ($el, $ref) and triggers for Kapla components

Usage

import { Application } from 'kapla';
import snitchy from 'snitchy';
import SnitchyKaplaPlugin from 'snitchy-kapla-plugin';
import variables from 'data/variables';

snitchy.load(variables);

const app = Application.start(document.body, undefined, {
  snitchy, // Just to be able to `this.snitchy[page || component]` without explicitly importing snitchy inside each component…
});
const snitchyKapla = new SnitchyKaplaPlugin(snitchy);

app.extend(snitchyKapla);

// app load or register…

Feel free to comment , add an issue or submit a pull request…