1.0.15 • Published 1 month ago

esbuild-plugin-twig v1.0.15

Weekly downloads
-
License
ISC
Repository
-
Last release
1 month ago

esbuild-plugin-twig

ESBuild plugin to handle and build Twig files.


CJS and ESM available.


Installation

PNPM

pnpm i twig esbuild-plguin-twig

NPM

npm i twig esbuild-plugin-twig

Yarn

yarn add twig esbuild-plugin-twig

Usage ESM

import Twig from 'twig'
import twigPlugin from 'esbuild-sass-twig'

esbuild
  .build({
    plugins: [
        twigPlugin({
            twig: Twig,
            src: 'src/twig',
            destination: 'public',
        })
    ],
  })
  .catch((e) => console.error(e.message));

Usage CJS

const twigPlugin = require('esbuild-plugin-twig');
const Twig = require('twig')

esbuild
  .build({
    plugins: [
        twigPlugin({
            twig: Twig,
            src: 'src/twig',
            destination: 'public',
        })
    ],
  })
  .catch((e) => console.error(e.message));

Options

OptionTypeDefaultRequired
twigImported twig packageEmptyyes
srcstringsrc/twigno
destinationstringpublicno
1.0.11

1 month ago

1.0.10

1 month ago

1.0.15

1 month ago

1.0.14

1 month ago

1.0.13

1 month ago

1.0.12

1 month ago

1.0.9

1 month ago

1.0.8

1 month ago

1.0.7

1 month ago

1.0.6

2 months ago

1.0.5

2 months ago

1.0.3

2 months ago

1.0.2

2 months ago

1.0.1

2 months ago

1.0.0

2 months ago