Socket
Socket
Sign inDemoInstall

bm-email-templatizer

Package Overview
Dependencies
5
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    bm-email-templatizer

create email templates through jade/pug, sass, and locale json files


Version published
Maintainers
1
Created

Readme

Source

#bmEmailTemplatizer Fully working email templatizer.

  • compile multiple emails templates with multiple locales.
  • fully customizable pipeline.

##Usage

###Minimal

var bmEmailTemplatizer = require('bm-email-templatizer');

bmEmailTemplatizer
  .allLocalesAllFiles()
  .then(function(results) {
    console.log('res', results);
  })
  .catch(function(err) {
    console.log('error', err);
  });

#Options

OptionTypeDescription
pipelineArraylist of functions to be run by templatizer
pathsObjectSee Paths section for more info.
var defaulOptions = {
  pipeline: ['compilePug', 'compileSass', 'juiceStyles', 'writeHtml'],
  paths: {
    base: process.cwd(),
    scss: 'scss/index.scss',
    locales: 'locales/**/*.json',
    views: 'views/**/*.pug',
    compiled: 'compiled'
  }
}

Paths

###base Default: process.cwd()

base path of project. By default it is the current working directory, the directory path node is called from.

###scss Default: scss/index.scss

Entrance point for scss file. Currently accepts only one entrance point.

###views Default: views/**/*.pug

views glob pattern relative to root.

###locales Default: locales/**/*.json

locales glob pattern relative to root. Locale file name will be supplied as a directory name to the writeHTML pipeline command

###compiled Default: compiled

Accepts a string for a folder name relative to the base path. Used by writeHtml in the pipeline to write the compiled files into directory. `{base}/{compiled}/{locale}/{fileName}.html

| Future: accepts an object, with absolute boolean, ext name, and folder path.

Keywords

FAQs

Last updated on 03 Jul 2016

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc