Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

malifi-jade

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

malifi-jade

Adds Jade template support to Malifi.

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
Source

malifi-jade

Adds Jade template support to Malifi.

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

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

malifi_jade= require 'malifi-jade'

module.exports=
  template_map_:
    'text/html': [
      ['jade', malifi_jade]
    ]

Remember that Malifi can map file extensions to template engine, so the following map would choose either the Jade or the Underscore template engine, based on file extension:

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

Alternatively, the site-wide mapping of Jade templates could be expressed in Javascript in _default.meta.js as:

(function() {
  var malifi_jade;

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

  module.exports = {
    template_map_: {
      'text/html': [
        ['jade', malifi_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.

Options

If ext_malifi_jade_options_ is defined in metadata, those options will be passed to Jade's compile function. The filename option will always be set by malifi-jade to the name of the template file.

FAQs

Package last updated on 30 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