1.0.0 • Published 8 months ago

@bkuri/rollup-plugin-string v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

rollup-plugin-string

Converts text files to modules.

Sourced from TrySound/rollup-plugin-string, refactored and updated libraries.

import text from "./main.txt"
console.log('text: %s', text)

Installation

npm i -D @bkuri/rollup-plugin-string
# or
yarn add -D @bkuri/rollup-plugin-string
# or
pnpm install -D @bkuri/rollup-plugin-string

Usage

// rollup.config.js
import string from '@bkuri/rollup-plugin-string'

export default {
  input: 'index.js',

  plugins: [
    string({
      // Required to be specified
      include: '**/*.txt',

      // Undefined by default
      exclude: [ '**/index.txt' ]
    })
  ]
}

License

MIT © Bernardo Kuri