Skip to content

mehtaarn000/htmltopug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

htmltopug

Convert html (requires a network connection)

Usage

You can convert an html string:

import * as htmlconverter from "@mehtaarn000/pugtohtml"

const converter = new htmlconverter.HtmlConverter()
const htmlData = "<h1>Hello World!</h1>"

const pugData = await converter.convertHtml(htmlData)
console.log(pugData)

An html file:

const pugData = await converter.convertHtmlFile("index.html")
console.log(pugData)

Or convert an html file and write it to a pug file:

converter.convertAndWriteHtmlFile("index.html", "index.pug")

About

Convert pug to html

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published