
Security News
Meet Socket at Black Hat Europe and BSides London 2025
Socket is heading to London! Stop by our booth or schedule a meeting to see what we've been working on.
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.
The npm package grunt-xslate receives a total of 18 weekly downloads. As such, grunt-xslate popularity was classified as not popular.
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
Socket is heading to London! Stop by our booth or schedule a meeting to see what we've been working on.

Security News
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.