@niht/haunted
v0.0.2
Published
Experimenting with hauntedjs
Downloads
1
Readme
Haunted Niht
This is an opinionated version of haunted that adds css template literals using @niht/stylis which uses the css preprocess sytlis. html template literals are bundled from lit-html. Everything is bundled together so this is a single dependency.
Installation
Use the package manager npm to install.
npm install @niht/haunted --save
Importing
Haunted can be imported just like any other library when using a bundler of your choice:
import { component, html, useState } from "@niht/haunted"
Web modules
Haunted can work directly in the browser without using any build tools. Simply import the haunted.js
bundle. You can use the [unpkg] or pika CDNs. This works great for demo pages and small apps. Here's an example with unpkg:
import { html, css, define } from "https://unpkg.com/@niht/haunted/lib/haunted-niht.mjs"
If using pika then, remember to specify the version
import { html, css, define } from "https://cdn.pika.dev/@niht/haunted/v0"
If you install Haunted locally this build is located at node_modules/@niht/haunted/lib/haunted-niht.js
.
Contributing
This repo is being used to experiment with the libraries that are bundled with it. Its fate is very uncertain, I would recommend using and contributing to the libraries described above.