Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/TrySound/rollup-plugin-string

Converts text files to modules
https://github.com/TrySound/rollup-plugin-string

Last synced: about 2 months ago
JSON representation

Converts text files to modules

Awesome Lists containing this project

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:[email protected])