Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
gulp-liquify
Advanced tools
A Liquid template render using TinyLiquid
$ npm install gulp-liquify
var liquify = require('gulp-liquify');
gulp.task("liquify", function() {
var locals = {
name: "Fred"
};
gulp.src('*.liquid')
.pipe(liquify(locals))
.pipe(gulp.dest('./dist/'))
});
You can pass a base for other templates to be included in a template. It defaults to the file base.
gulp.src('*.liquid')
.pipe(liquify(locals, { base: "../templates/" }))
});
You can pass file specific locals by attaching it to the vinyl file object in a previous task.
var liquify = require('gulp-liquify');
var through = require('through2');
gulp.task("liquify", function() {
var locals = {
name: "Fred"
};
gulp.src('*.liquid')
.pipe(through.obj(function(file, enc, cb) {
file.locals = {
number: Math.random(),
path: file.path
};
cb(null, file);
}))
.pipe(liquify(locals))
.pipe(gulp.dest('./dist/'))
});
TinyLiquid does not support the locals variables like this:
a[0]
, a["b"]
, a[0]["b"]
and so on.
Only support to use .
as the separator: a.b
, a.b.c
FAQs
Render Liquid templates in Gulp using TinyLiquid
We found that gulp-liquify 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.