
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Full documentation is at pugjs.org
example
/**
* Module dependencies.
*/
var pug = require('../')
, path = __dirname + '/includes.pug'
, str = require('fs').readFileSync(path, 'utf8')
console.time("l")
let options = {
filename: "includes.pug",
pretty: true,
loadFromStrArr:
[
{ name: "head.pug", content: "head\n title My Site [[[ LOAD FROM STRING ARRAY ]]] \n // including other pug works\n include scripts.pug\n // including .html, .css, etc works\n include style.css\n" },
{ name: "includes.pug", content: "\nhtml\n include includes/head.pug\n body\n h1 My Site\n p Welcome to my super lame site.\n include includes/foot.pug\n" },
{ name: "foot.pug", content: "#footer\n p Copyright (c) foobar\n each product in products\n div=product" },
{ name: "scripts.pug", content: "script(src=\'/javascripts/jquery.js\')\nscript(src=\'/javascripts/app.js\')\n" },
{ name: "style.css", content: "<style>\n body {\n padding: 50px;\n }\n</style>" }
],
userData: { products: [1, 2, 4] }
}
var fn = pug.compile(str, options);
console.log(fn({ products: [1, 2, 4] }));
console.timeEnd("l")
/* <html>
<head>
<title>My Site [[[ LOAD FROM STRING ARRAY ]]] </title>
<!-- including other pug works-->
<script src="/javascripts/jquery.js"></script>
<script src="/javascripts/app.js"></script>
<!-- including .html, .css, etc works--><style>
body {
padding: 50px;
}
</style>
</head>
<body>
<h1>My Site</h1>
<p>Welcome to my super lame site.</p>
<div id="footer">
<p>Copyright (c) foobar</p>
</div>
</body>
</html>
*/
MIT
FAQs
A clean, whitespace-sensitive template language for writing HTML
We found that pug-cache 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.