0.0.3 • Published 2 years ago

pointlez v0.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

pointlez

Library for templating DOM on a web page.

Installation

npm install pointlez

Usage

<!DOCTYPE html>
<html lang="en">

<head>
  ...
</head>

<body>
  <template id="app"></template>
  <template id="footer"></template>
</body>

</html>
import { replaceWithString, replaceWithFile } from 'pointlez';

// Create a file `/templates/app.html` and then import it
replaceWithFile('#app', 'templates/app.html');

replaceWithString('#footer', '<p>Footer</p>');

Using the CDN

<script defer src="https://unpkg.com/pointlez@latest/dist/pointlez.umd.js"></script>