Research
Security News
Kill Switch Hidden in npm Packages Typosquatting Chalk and Chokidar
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
gulp-multi-renderer
Advanced tools
plugin to render contents using various template engines.
npm install --save-dev gulp-multi-renderer
gulpfile.js
var frontMatter = require('gulp-front-matter');
var marked = require('gulp-marked');
var renderer = require('gulp-multi-renderer');
gulp.src('./src/*.md')
.pipe(frontMatter({
remove: true
}))
.pipe(renderer({
target: "content"
}))
.pipe(marked())
.pipe(renderer({}))
.pipe(gulp.dest('./dist'));
});
markdown with YAML front matter.
---
title: My Awesome Document
---
Hello, This is <%- frontMatter.title %>.
after pre-process.
Hello, This is My Awesome Document.
layout/default.ejs
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title><%= frontMatter.title %></title>
</head>
<body>
<%- contents %>
</body>
</html>
after post-process.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>My Awesome Document</title>
</head>
<body>
<p>Hello, This is My Awesome Document.</p>
</body>
</html>
Type: hash
Default: { target: "wrap", property: "forntMatter", templateDir: "./layouts"}
Type: String
Default: wrap
When content
is specified, it render embedded template within file.contents
. Default template is ejs. If you want to user mustache, set mustache
to frontMatter.local
.
When wrap
is specified, you can refer file.contents
through contents
variable in the template file. Default template file is ./layouts/default.ejs
. You can specify template file by frontMatter.layout
.
You can also use mustache or jade for template file.
Type: String
Default: forntMatter
a Object name of which contains local variables.
Type: String
Default: ./layouts/
A directory in which template files are placed.
FAQs
plugin to render contents using various template engines.
The npm package gulp-multi-renderer receives a total of 2 weekly downloads. As such, gulp-multi-renderer popularity was classified as not popular.
We found that gulp-multi-renderer 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.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.