Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/TrySound/rollup-plugin-string
- Owner: TrySound
- License: mit
- Created: 2015-11-02T14:00:19.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2022-12-02T23:41:00.000Z (about 2 years ago)
- Last Synced: 2024-06-11T17:38:24.548Z (6 months ago)
- Language: JavaScript
- Homepage:
- Size: 120 KB
- Stars: 83
- Watchers: 2
- Forks: 13
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome - string
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])