
Security News
Package Maintainers Call for Improvements to GitHub’s New npm Security Plan
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Artist is a template engine for node.js built on fest.
Features:
npm install artist
View source for documentation.
With express:
app.engine('xml', require('artist').render());
With express (production environment):
app.engine('xml', require('artist').render({
cache: true,
debug: false
}));
Synchronous version:
var render = require('artist').renderSync();
// ...
var html = render('index.xml', {foo: 'bar'});
index.xml
<?xml version="1.0"?>
<fest:template xmlns:fest="http://fest.mail.ru" context_name="json">
<fest:value>json.foo</fest:value>
</fest:template>
Proxy is a connect middleware. It handles requests to the templates, compiles them and wraps results into AMD module, JSONP or any other format.
AMD:
app.use(require('artist').proxy({
format: 'amd', // 'amd', 'jsonp' or any string with #ID# and #FN# placeholders
route: '/scripts/templates', // middleware mounting point
templates: app.get('views') // path to the view directory
}));
GET /scripts/templates/layout.js
define(function(){return function(__fest_context){
...
}});
JSONP:
app.use(require('artist').proxy({
format: 'jsonp',
route: '/scripts/templates',
templates: app.get('views')
}));
GET /scripts/templates/layout.js?jsonp=handleTemplate
handleTemplate(function(__fest_context){
...
});
FAQs
Template engine for node.js built on fest
We found that artist 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
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.