rollup-plugin-tpl

v1.0.2
Import text files as tpls
rollup-plugin template

rollup-plugin-tpl

Please use ** rollup-plugin-string**. This project only for temporary usage.

Import text files as tpls

import tpl from './tpl.html';
console.log( `Template for render: ${tpl}` );

Install

npm i rollup-plugin-tpl -D

Usage

import { rollup } from 'rollup';
import tpl from 'rollup-plugin-tpl';

rollup({
    entry: 'main.js',
    plugins: [
        tpl({
            extensions: ['.html']
        })
    ]
});

Options

extensions

Required. Type: array

Specifies which files should be converted to tpl

include

Type: array

Specifies which files should be include to tpl

exclude

Type: array

Specifies which files should be exclude to tpl

License

MIT © Bogdan Chadkin

npm i rollup-plugin-tpl

Metadata

  • MIT
  • Whatever
  • BinRui.Guan
  • released 4/19/2016

Downloads

Maintainers