Skip to content

color/babel-plugin-transform-pug-html

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

babel-plugin-transform-pug-html

Transforms "pug" tagged template literals to html strings

Usage

Just add to your .babelrc:

{
  ...
  "plugins": ["transform-pug-html"]
}

Then anywhere in your code you can write:

pug `
div
  p This text belongs to the paragraph tag.
  br
  .
    This text belongs to the div tag.
`

// Which produces:

`<div>
  <p>This text belongs to the paragraph tag.</p>
  <br/>
  This text belongs to the div tag.
</div>`

About

Transforms "pug" tagged template literals into html strings

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%