Skip to content

No more minification and prettification

Compare
Choose a tag to compare
@motss motss released this 15 Mar 11:36

Notable changes

  • Removal of htmlMinifier and pretty as those can be optional. Users are free to choose whatever modules they like to achieve the same thing.
  • Revamped entire module to provider simple methods for easier templating which is what the goal of this module:
    • html - parse HTML template literals as HTML document.
    • htmlFragment - parse HTML template literals as HTML document fragment.

Simple usage

html()

import { html } from 'lit-ntml';

/** Assuming top-level await is enabled... */
await html`<h1>Hello, World!</h1>`; /** <!DOCTYPE html><html><head></head><body><h1>Hello, World!</h1></body></html>

htmlFragment()

import { htmlFragment as html } from 'lit-ntml';

/** Assuming top-level await is enabled... */
await html`<h1>Hello, World!</h1>`; /** <h1>Hello, World!</h1> */