
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
grunt-xslate
Advanced tools
Compile Text::Xslate template files from Grunt.
This plugin requires Grunt ~0.4.0
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-xslate --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-xslate');
This plugin was designed to work with Grunt 0.4.x. If you're still using grunt v0.3.x it's strongly recommended that you upgrade, but in case you can't please use v0.3.2.
and install xslate
command or your command.
cpanm Text::Xslate
Run this task with the grunt xslate
command.
Task targets, files and options may be specified according to the grunt Configuring tasks guide.
Enebale to carton exec
command.
If you are using a carton
, you should enable.
Rather than xslate
command, you can run the perl command that you have defined.
write your perl, and grant excute authority.
e.g.
#!/usr/bin/env perl
use Text::Xslate;
my ($template_path, ) = @ARGV;
my $engine = Text::Xslate->new(%your_options);
print $engine->render(template_path, \%your_arguments);
chmod 755 bin/your-engine.pl
Define template variables.
This will be passed to define
option of xslate
command.
You can specified template syntax.(e.g. Kolon)
You can rocess the data to be specified define
{
xslate: {
example: {
options: {
formatter: function (value, name) {
return JSON.stringify(value) // --define="foo={"fuga":1000, "hoge":2000}"
},
data: {
foo: {
fuga: 1000,
hoge: 2000,
}
}
}
}
}
}
xslate: {
basic: {
options: {
cartonExec: true,
data: {
content: 'this is the message!',
}
},
files:
'dist/output.html': 'src/input.tx'
},
original: {
options: {
cartonExec: true,
syntax: null,
runner: 'bin/my-xslate',
},
files: [
expand: true,
flatten: true,
ext: '.html',
src: '**/*.tx',
dest: 'dist/'
]
}
}
FAQs
Compile Text::Xslate template files from Grunt.
We found that grunt-xslate 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
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.