New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

malifi-consolidate

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

malifi-consolidate

Adds template support to Malifi for the consolidate.js template engine consolidation library.

  • 0.1.1
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

malifi-consolidate

Adds template support to Malifi for the consolidate.js template engine consolidation library.

Using this, any template library supported by Consolidate.js should be usable with Malifi.

Usage: In the metadata template_map_ object for the target MIME type, map file extension(s) to malifi-consolidate([engine_name]).

For example, to establish template mapping for an entire site, in the site's root directory _default.meta.coffee file:

malifi_consolidate= require 'malifi-consolidate'

module.exports=
  template_map_:
    'text/html': [
      ['html', malifi_consolidate('underscore')]
      ['jade', malifi_consolidate('jade')]
    ]

In the preceding example, if an HTML document were requested, templates with an html extension will be mapped to the Underscore template engine. Templates with a jade extension would be mapped to the Jade template engine.

Alternatively, the same could be expressed in _default.meta.js as:

(function() {
  var malifi_consolidate;

  malifi_consolidate = require('../../../index');

  module.exports = {
    template_map_: {
      'text/html': [
      	['html', malifi_consolidate('underscore')],
      	['jade', malifi_consolidate('jade')]
      ]
    }
  };

}).call(this);

Of course, the metadata file could define other metadata, and the mapping could be established for any directory or even for individual URLs.

FAQs

Package last updated on 15 Apr 2013

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc