Skip to content

Integrations Options

See Integrations API to learn more about this section.

integrations

  • Type: (Integration | Integration[])[]

Array of integrations to use. Integration should be function returning object or object. All available options to official integrations can be found on this page.

@vituum/tailwind

  • Type: object
  • Default: {}

Optional inline TailwindCSS config. You can use either tailwind.config.cjs or inline config here, see more about TailwindCSS configuration here.

@vituum/juice

paths

  • Type: string[]
  • Default: ['emails']

Paths in which html files will be processed with Juice

tables

  • Type: boolean
  • Default: true

Whenever to add default attributes border="0" cellpadding="0" cellspacing="0" to every table.

doctype

  • Type: string
  • Default: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Default doctype to use, replaces <!DOCTYPE html> from your .html with your doctype to use in emails.

juice

  • Type: object
  • Default: {}

Additional options for Juice. Learn more about Juice options here.

send.template

  • Type: string
  • Default: null

Path to template to use for sending a test email. Should be already built html file.

send.from

  • Type: string
  • Default: example@example.com

Email address from which the email will be sent.

send.to

  • Type: string
  • Default: null

Email address to which the email will be sent.

send.host

  • Type: string
  • Default: null

SMTP Host from to send, you can also use VITUUM_SMTP_HOST in .env file.

send.user

  • Type: string
  • Default: null

SMTP User from to send, you can also use VITUUM_SMTP_USER in .env file.

send.pass

  • Type: string
  • Default: null

SMTP Password from to send, you can also use VITUUM_SMTP_PASS in .env file.

@vituum/posthtml

plugins

  • Type: (Plugin | Plugin[] | Promise<Plugin | Plugin[]>)[]
  • Default: []

Additional PostHTML plugins to use. See PostHTML GitHub for list of all official plugins.

options

  • Type: object
  • Default: {}

Additional PostHTML options to use. See PostHTML options for more info.

@vituum/twig

reload

  • Type: boolean or function
  • Default: true

Whenever to auto-reload browser window upon html, twig or json file change. You can provide function to filter upon which file a reload should occur.

root

  • Type: string
  • Default: null

Root is inherited from Vite root by default. For example, you can change this to resolve(process.cwd(), 'src/templates'), then you can use includes with paths defaulting to this directory.

filters

  • Type: object
  • Default: {}

Object of named filter functions to use, see TwigJS wiki for more info.

functions

  • Type: object
  • Default: {}

Object of named functions to use, see TwigJS wiki for more info.

extensions

  • Type: function[]
  • Default: []

Array of functions that extend TwigJS with custom tag, see TwigJS wiki for more info.

namespaces

  • Type: object
  • Default: {}

Object defining namespaces, see TwigJS wiki for more info.

data

  • Type: string
  • Default: ''

Path to additional data provided with json file. Can be a file, or a glob like this /path/to/*.jsom.

globals

  • Type: object
  • Default: {}

Other global data to use. Can be object or function returning object, or combination of both.

filetypes

  • Type: object

Which type of ext-names should be processed by the plugin.

For example, this is by default in Vituum.

javascript
{
    html: config.templates.format === 'twig' ? /.(json|json.html|twig.json|twig.json.html|twig|twig.html)$/ : /.(twig.json|twig.json.html|twig|twig.html)$/,
    json: /.(json.twig|json.twig.html)$/
}

twig.compileOptions

  • Type: object
  • Default: {}

Additional TwigJS compileOptions, see TwigJS wiki for more info. It's not well documented.

twig.renderOptions

  • Type: object
  • Default: {}

Additional TwigJS renderOptions, see TwigJS wiki for more info. It's not well documented.

@vituum/latte

reload

  • Type: boolean or function
  • Default: true

Whenever to auto-reload browser window upon html, latte or json file change. You can provide function to filter upon which file a reload should occur.

root

  • Type: string
  • Default: null

Root is inherited from Vite root by default. For example, you can change this to resolve(process.cwd(), 'src/templates'), then you can use includes with paths defaulting to this directory.

filters

  • Type: object
  • Default: {}

Object of named filters to use. Can be function or string providing path to .php file. See examples here or official docs here.

functions

  • Type: object
  • Default: {}

Object of named functions to use. Can be function or string providing path to .php file. See examples here or official docs here.

tags

  • Type: function[]
  • Default: []

Object of named tags to use. Only a string providing path to .php file. See official docs here.

data

  • Type: string
  • Default: ''

Path to additional data provided with json file. Can be a file, or a glob like this /path/to/*.jsom.

globals

  • Type: object
  • Default: {}

Other global data to use. Can be object or function returning object, or combination of both.

filetypes

  • Type: object

Which type of ext-names should be processed by the plugin.

For example, this is by default in Vituum.

javascript
{
    html: config.templates.format === 'latte' ? /.(json|json.html|latte.json|latte.json.html|latte|latte.html)$/ : /.(latte.json|latte.json.html|latte|latte.html)$/,
    json: /.(json.latte|json.latte.html)$/
}

@vituum/liquid

reload

  • Type: boolean or function
  • Default: true

Whenever to auto-reload browser window upon html, liquid or json file change. You can provide function to filter upon which file a reload should occur.

root

  • Type: string
  • Default: null

Root is inherited from Vite root by default. For example, you can change this to resolve(process.cwd(), 'src/templates'), then you can use includes with paths defaulting to this directory.

filters

  • Type: object
  • Default: {}

Object of named filter functions to use, see LiquidJS docs for more info.

tags

  • Type: function[]
  • Default: []

Array of functions that extend LiquidJS with custom tag, see LiquidJS docs for more info.

data

  • Type: string
  • Default: ''

Path to additional data provided with json file. Can be a file, or a glob like this /path/to/*.jsom.

globals

  • Type: object
  • Default: {}

Other global data to use. Can be object or function returning object, or combination of both.

filetypes

  • Type: object

Which type of ext-names should be processed by the plugin.

For example, this is by default in Vituum.

javascript
{
    html: config.templates.format === 'liquid' ? /.(json|json.html|liquid.json|liquid.json.html|liquid|liquid.html)$/ : /.(liquid.json|liquid.json.html|liquid|liquid.html)$/,
    json: /.(json.liquid|json.liquid.html)$/
}

@vituum/nunjucks

reload

  • Type: boolean or function
  • Default: true

Whenever to auto-reload browser window upon html, njk or json file change. You can provide function to filter upon which file a reload should occur.

root

  • Type: string
  • Default: null

Root is inherited from Vite root by default. For example, you can change this to resolve(process.cwd(), 'src/templates'), then you can use includes with paths defaulting to this directory.

filters

  • Type: object
  • Default: {}

Object of named filter functions to use, see Nunjucks docs for more info.

extensions

  • Type: object
  • Default: {}

Object of named extensions to use, see Nunjucks docs for more info.

data

  • Type: string
  • Default: ''

Path to additional data provided with json file. Can be a file, or a glob like this /path/to/*.jsom.

globals

  • Type: object
  • Default: {}

Other global data to use. Can be object or function returning object, or combination of both.

filetypes

  • Type: object

Which type of ext-names should be processed by the plugin.

For example, this is by default in Vituum.

javascript
{
    html: (config.templates.format === 'njk' || config.templates.format === 'nunjucks') ? /.(json|json.html|njk.json|njk.json.html|njk|njk.html)$/ : /.(njk.json|njk.json.html|njk|njk.html)$/,
    json: /.(json.njk|json.njk.html)$/
}

nunjucks

  • Type: object
  • Default: {}

Additional Nunjucks options, see Nunjucks docs for more info.

@vituum/pug

reload

  • Type: boolean or function
  • Default: true

Whenever to auto-reload browser window upon html, pug or json file change. You can provide function to filter upon which file a reload should occur.

root

  • Type: string
  • Default: null

Root is inherited from Vite root by default. For example, you can change this to resolve(process.cwd(), 'src/templates'), then you can use includes with paths defaulting to this directory.

filters

  • Type: object
  • Default: {}

Object of named filter functions to use, see Pug docs for more info.

data

  • Type: string
  • Default: ''

Path to additional data provided with json file. Can be a file, or a glob like this /path/to/*.jsom.

globals

  • Type: object
  • Default: {}

Other global data to use. Can be object or function returning object, or combination of both.

filetypes

  • Type: object

Which type of ext-names should be processed by the plugin.

For example, this is by default in Vituum.

javascript
{
    html: config.templates.format === 'pug' ? /.(json|json.html|pug.json|pug.json.html|pug|pug.html)$/ : /.(pug.json|pug.json.html|pug|pug.html)$/,
    json: /.(json.pug|json.pug.html)$/
}

pug

  • Type: object
  • Default: {}

Additional Pug options, see Pug docs for more info.

@vituum/handlebars

reload

  • Type: boolean or function
  • Default: true

Whenever to auto-reload browser window upon html, hbs or json file change. You can provide function to filter upon which file a reload should occur.

root

  • Type: string
  • Default: null

Root is inherited from Vite root by default. For example, you can change this to resolve(process.cwd(), 'src/templates'), then you can use includes with paths defaulting to this directory.

helpers

  • Type: object
  • Default: {}

Object of named helper functions to use, see Handlebars docs for more info.

data

  • Type: string
  • Default: ''

Path to additional data provided with json file. Can be a file, or a glob like this /path/to/*.jsom.

globals

  • Type: object
  • Default: {}

Other global data to use. Can be object or function returning object, or combination of both.

partials.directory

  • Type: string
  • Default: null

Root directory for partials. Directory is inherited from plugin root by default.

partials.extname

  • Type: boolean
  • Default: true

Whenever to use ext-name in partial path like this "path/to/partial.hbs

filetypes

  • Type: object

Which type of ext-names should be processed by the plugin.

For example, this is by default in Vituum.

javascript
{
    html: config.templates.format === 'hbs' ? /.(json|json.html|hbs.json|hbs.json.html|hbs|hbs.html)$/ : /.(hbs.json|hbs.json.html|hbs|hbs.html)$/,
    json: /.(json.hbs|json.hbs.html)$/
}

handlebars.compileOptions

  • Type: object
  • Default: {}

Additional Handlebars compileOptions, see Handlebars docs for more info. Not well documented actually.

handlebars.runtimeOptions

  • Type: object
  • Default: {}

Additional Handlebars runtimeOptions, see Handlebars docs for more info. Not well documented actually.

Released under the MIT License.