snail-web-core

The 2 base things in this templating system is [[Component]] and [[ComponentNode]]

Usage no npm install needed!

<script type="module">
  import snailWebCore from 'https://cdn.skypack.dev/snail-web-core';
</script>

README

BASICS

The 2 base things in this templating system is [[Component]] and [[ComponentNode]]

Every DOM element with the attribute "data-module" will have an Instance of [[ComponentNode]] wrapped around it. And that Instance, containing references to the [[Component]]'s on that DOM element.

A DOM element can only ever have one ComponentNode, but can have multiple Component's on it.

Example:
<div data-module="CompOne, CompTwo, CompThree"></div>

This would create a ComponentNode and three modules all extending [[Component]]'s.

SCRIPTS

Run a test:
npm run test
Compile a release build:
npm run build