Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

babel-plugin-transform-pug-html

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-transform-pug-html

Transforms "pug" tagged template literals into html strings

  • 0.1.1
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

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

Inspired from https://github.com/e-jigsaw/babel-plugin-transform-pug-to-react

Contributing:

Feel free to open issues to propose stuff and participate. Pull requests are also welcome.

Licence:

MIT

Keywords

FAQs

Package last updated on 14 Mar 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc