dot-require

1.0.1 • Public • Published

dot-require

NPM Version NPM Downloads

Node.js extension installer for doT templates

Usage

require('dot-require').install();

Or with options:

require('dot-require').install({
    extension: '.dot',
    defines: {
        some_dot_compile_define: true
    },
    additionalTransform: function(src) {
        //do some transform
        return src;
    },
    templateSettings: {
        strip: false
    }
});

templateSettings defaults to doT.templateSettings, with partial defaults supported. For more information on templateSettings refere to the doT documentation.

extension defaults to .dot

And to uninstall:

require('dot-require').uninstall();

Changelog

1.0.1
  • Accidentally a word
  • Removed unnecessary testing code
1.0.0
  • Initial release

Package Sidebar

Install

npm i dot-require

Weekly Downloads

0

Version

1.0.1

License

MIT

Last publish

Collaborators

  • novacrazy