Package detail

rollup-plugin-string

TrySound192.4kMIT3.0.0

Converts text files to modules

rollup-plugin, stringify, string, template

readme

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

changelog

Changelog

2.0.2

  • Return a name

2.0.1

  • Reverted transform return empty map

2.0.0

  • Remove ext option in favour of include/exclude convention

1.0.1

  • Use rollup cli and rollup.config.js
  • Generate only cjs format

1.0.0

  • Initial release