babel-plugin-transform-pug-html
Transforms "pug" tagged template literals to html strings
Install
Install using npm
$ npm install --save-dev babel-plugin-transform-pug-html
And add to your .babelrc
:
{
...
"plugins": ["transform-pug-html"]
}
Usage
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 will compile to:
`<div>
<p>This text belongs to the paragraph tag.</p>
<br/>
This text belongs to the div tag.
</div>`
Syntax:
pug ` ... `
Test
Install the dependencies, via:
$ npm install
then run:
$ npm test
Contributing:
Feel free to open issues to propose stuff and participate. Pull requests are also welcome.
Licence:
MIT