# rollup-plugin-string

> Converts text files to modules

Latest version **3.0.0** (published 2019-02-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install rollup-plugin-string
pnpm add rollup-plugin-string
yarn add rollup-plugin-string
bun add rollup-plugin-string
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.0.0 |
| Published | 2019-02-23 |
| First published | 2015-11-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 3.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Bogdan Chadkin |
| Maintainers | trysound |
| Keywords | rollup-plugin, stringify, string, template |

## Links

- npm: https://www.npmjs.com/package/rollup-plugin-string
- Repository: https://github.com/TrySound/rollup-plugin-string
- Issues: https://github.com/TrySound/rollup-plugin-string/issues
- npm.io page: https://npm.io/package/rollup-plugin-string

## Dependencies (1)

- [rollup-pluginutils](https://npm.io/package/rollup-pluginutils.md) ^2.4.1

## Alternatives

- [@mce/gif](https://npm.io/package/@mce/gif.md) — 2.6K weekly downloads
- [cleanse](https://npm.io/package/cleanse.md) — 173 weekly downloads
- [str](https://npm.io/package/str.md) — 127 weekly downloads
- [naming](https://npm.io/package/naming.md) — 95 weekly downloads
- [tap-telco-api](https://npm.io/package/tap-telco-api.md) — 19 weekly downloads

## Recent versions

- 3.0.0 (latest) — 2019-02-23
- 2.0.2 — 2016-06-23
- 2.0.1 — 2016-06-23
- 2.0.0 — 2016-06-11
- 1.0.1 — 2015-11-05
- 1.0.0 — 2015-11-02

## README

# rollup-plugin-string [![Build Status](https://travis-ci.org/TrySound/rollup-plugin-string.svg)](https://travis-ci.org/TrySound/rollup-plugin-string)

Converts text files to modules:

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

## Installation

```sh
npm i rollup-plugin-string -D
```

## Usage

```js
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](mailto:trysound@yandex.ru)

---
_Source: https://npm.io/package/rollup-plugin-string · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
