TrySound / rollup-plugin-string

Converts text files to modules

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rollup-plugin-string Build Status

Converts text files to modules:

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

Installation

npm i rollup-plugin-string -D

Usage

import { rollup } from "rollup";
import { string } from "rollup-plugin-string";

rollup({
  entry: "main.js",
  plugins: [
    string({
      // Required to be specified
      include: "**/*.html",

      // Undefined by default
      exclude: ["**/index.html"]
    })
  ]
});

License

MIT © Bogdan Chadkin

About

Converts text files to modules

License:MIT License


Languages

Language:JavaScript 100.0%