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

htmltemplate-transform

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

htmltemplate-transform

Pluggable transforms for HTML::Template

  • 1.0.8
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
131
increased by211.9%
Maintainers
1
Weekly downloads
 
Created
Source

HTMLTemplate transformations

TravisCI

Pluggable transforms for HTML::Template.

Installation

npm install htmltemplate-transform

Usage

var path = require('path');
var transform = require('htmltemplate-transform');

// Plugin that inlines external template files into parent.
var include = require('htmltemplate-transform/plugins/include');

// Plugin that expands dot notation into a series of property accessors.
var jpath = require('htmltemplate-transform/plugins/jpath');

var templateFile = path.join(__dirname, 'template.tmpl');

var ast = transform(templateFile)
    .using(
        include({
            includeTags: ['TMPL_INCLUDE'],
            resolvePath: function(tagname, from, to) {
                return path.resolve(path.dirname(from), to);
            }
        })
    )
    .using(jpath()) // Plugins can be chained.
    .toAST();

console.log(ast);

Keywords

FAQs

Package last updated on 25 Nov 2015

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