JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 249
  • Score
    100M100P100Q80005F
  • License

Utils for [Template](https://github.com/jonschlinkert/template).

Package Exports

  • template-utils

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (template-utils) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

template-utils NPM version

Utils for Template.

Install with npm

npm i template-utils --save

Run tests

npm test

Usage

var utils = require('template-utils');

API

.defaultProps

  • template {Object}: Template Object to add properties to.

Setup default properties and objects on a template object.

.headings

Adjust markdown heading levels.

  • str {String}
  • returns: {String}

Adds one heading level next to all markdown headings to make them correct within the scope of the inheriting document. Headings in fenced code blocks are skipped.

utils.heading(str);

.parsePath

  • template {Object}: Template object

Add parsed src and dest path properties to the data object.

.toTemplate

Convert a Vinyl file object to a non-vinyl template object.

  • file {Object}: Vinyl file object
  • returns {Object}: Object with properties expected by Template or Template apps
var template = utils.toTemplate(file);

.toVinyl

Convert a template object to a Vinyl file object.

  • file {Object}: Object with properties expected by Template
  • returns {Object}: Vinyl file object
var file = utils.toVinyl(template);

Contributing

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

Author

Jon Schlinkert

License

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


This file was generated by verb on February 01, 2015.