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

template

Package Overview
Dependencies
Maintainers
2
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

template

Render templates using any engine. Supports, layouts, pages, partials and custom template types. Use template helpers, middleware, routes, loaders, and lots more. Powers assemble, verb and other node.js apps.

  • 0.14.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4.9K
increased by110.49%
Maintainers
2
Weekly downloads
 
Created
Source

template NPM version Build Status Coverage Status

Render templates using any engine. Supports, layouts, pages, partials and custom template types. Use template helpers, middleware, routes, loaders, and lots more. Powers assemble, verb and other node.js apps.

Table of contents

(Table of contents generated by verb)

Install

Install with npm

npm i template --save

Features

  • ~100% test coverage (as of May. 12, 2015) with ~500 unit tests
  • Render templates with any engine, including any consolidate, transformers, or any compatible engine. Or, create your own!
  • Create custom template types. Built-in types are page, layout and partial, but you can create special types for any use case.
  • Custom loaders. Loaders are simple functions that change how templates are loaded and can be used with template types, or individual templates.

Getting started

var Template = require('template');
var template = new Template();

API

Go to the API documentation

User docs

(Table of contents generated by verb)

Libraries that are used in Template:

  • async: Higher-order functions and common patterns for asynchronous code
  • config-cache: General purpose JavaScript object storage methods.
  • en-route: Routing for static site generators, build systems and task runners, heavily based on express.js routes… more
  • engine-cache: express.js inspired template-engine manager.
  • helper-cache: Easily register and get helper functions to be passed to any template engine or node.js… more
  • layouts: Wrap templates with layouts. Layouts can be nested and optionally use other layouts.
  • loader-cache: Register loader functions that dynamically read, parse or otherwise transform file contents when the name… more

Running tests

Install dev dependencies:

npm i -d && npm test

Build docs

Install devDependencies:

npm i -d && verb

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue

Authors

Jon Schlinkert

License

Copyright (c) 2014-2015 Jon Schlinkert Released under the MIT license.


This file was generated by verb-cli on May 12, 2015.

Keywords

FAQs

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