Skip to content

Integrations

With this API you can pre-define config options, plugin options or create tasks that can be run via vituum command. Here are some official Vituum integrations.

Tailwind (@vituum/tailwind)

Adds out of the box support for TailwindCSS to your project. Also, with the same core PostCSS plugins already included in Vituum.

See docs for more info about TailwindCSS

Install

npm

bash
npm i @vituum/tailwind --save-dev

yarn

bash
yarn add @vituum/tailwind -D

Config

javascript
import { defineConfig } from 'vituum'
import tailwind from '@vituum/tailwind'

export default defineConfig({
    integrations: [tailwind()]
})

See @vituum/tailwind to learn more about config options

Juice (@vituum/juice)

Adds @vituum/vite-plugin-juice to your project with pre-defined config.

Also adds vituum send command for sending test emails with nodemailer

This plugin is used to inline your css to html. It's handy for creating email templates. Learn more about that here.

See docs for more info about Juice.

Install

npm

bash
npm i @vituum/juice --save-dev

yarn

bash
yarn add @vituum/juice -D

Config

javascript
import { defineConfig } from 'vituum'
import juice from '@vituum/juice'

export default defineConfig({
    integrations: [juice()]
})

See @vituum/juice to learn more about config options

PostHTML (@vituum/posthtml)

Learn more about use of this integration here

Twig (@vituum/twig)

Learn more about use of this integration here

Latte (@vituum/twig)

Learn more about use of this integration here

Liquid (@vituum/liquid)

Learn more about use of this integration here

Nunjucks (@vituum/nunjucks)

Learn more about use of this integration here

Pug (@vituum/pug)

Learn more about use of this integration here

Handlebars (@vituum/handlebars)

Learn more about use of this integration here

Create your own integration

You can get inspiration from the code of official Vituum integrations here.

Integration can be object or function that returns object with vite plugin, config or task (can be run with vituum command)

javascript
const integration = (userConfig = {}) => {
    return {
        plugin: (vituumConfig) => yourVitePlugin(userConfig),
        config: {
            // vituum config defaults to change
        },
        task: {
            name: 'task-name',
            action: yourFunction()
        }
    }
}

export default integration

Released under the MIT License.