Skip to content

Repository files navigation

HyperPug

npm versionWebsite shields.io

Lighter Pug for browser/Electron. With Pug filters' support.

Usage

importHyperPugfrom'hyperpug'consthp=newHyperPug()console.log(hp.parse(HYPERPUG_STRING))

Usage with filters

Filters are normalized for Markdown and other indented languages are well.

importHyperPugfrom'hyperpug'consthp=newHyperPug({markdown: (s)=>{returnmarkdownMaker(s)}})console.log(hp.parse(HYPERPUG_STRING))

Usage on the browser

<divid="hyperpug"></div><scriptsrc="https://unpkg.com/hyperpug"></script><script>consthp=newHyperPug({markdown: (s)=>{returnmarkdownMaker(s)}})document.getElementById("hyperpug").innerHTML=hp.parse(`style. .red { color: red; } section { margin-bottom: 1rem; }section(class="x") div hello blockquote .red goodbye :markdown # This is some headingsmall Yes, this is a good idea.`)</script>

About

Lightweight Pug for browser/Electron. With Pug filters' support, which can also contain indented language like markdown.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages