Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Converts HTML to Pug templating language (formerly Jade).
Requires Node.js version 7.6
or higher.
Turns this :unamused:
<!doctype html>
<html lang="en">
<head>
<title>Hello World!</title>
</head>
<body>
<div id="content">
<h1 class="title">Hello World!</h1>
</div>
</body>
</html>
Into this :tada:
doctype html
html(lang='en')
head
title Hello World!
body
#content
h1.title Hello World!
Get it on npm:
npm install -g html2pug
Accept input from a file or stdin and write to stdout:
# choose a file
html2pug < example.html
# use pipe
echo '<h1>foo</h1>' | html2pug -f
Write output to a file:
html2pug < example.html > example.pug
See html2pug --help
for more information.
const html2pug = require('html2pug')
const html = '<header><h1 class="title">Hello World!</h1></header>'
const pug = html2pug(html, { useTabs: true })
Name | Type | Default | Description |
---|---|---|---|
useTabs | Boolean | false | Use tabs instead of spaces |
useCommas | Boolean | true | Use commas to separate node attributes, or a space if false |
isFragment | Boolean | false | Wraps result in enclosing <html> and <body> tags if false |
[3.0.0] - 2019-04-07
tabs
to useTabs
(BREAKING CHANGE)fragment
to isFragment
(BREAKING CHANGE)preserveLineBreaks
default is true
<script>
, <pre>
etc.)useCommas
for attribute separatorFAQs
Converts HTML to Pug
The npm package html2pug receives a total of 263 weekly downloads. As such, html2pug popularity was classified as not popular.
We found that html2pug demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.