rollup-plugin-brfs
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

rollup-plugin-brfs Build Status

Rollup plugin that inliing fs.readFile contents.

This plugin use browserify/brfs. It supports that

  • fs.readFileSync(pathExpr, enc=null)
  • fs.readFile(pathExpr, enc=null, cb)
  • fs.readdirSync(pathExpr)
  • fs.readdir(pathExpr, cb)

Install

Install with npm:

npm install rollup-plugin-brfs

Usage

// rollup.config.js
import brfs from 'rollup-plugin-brfs';
 
export default {
  input: 'src/main.js',
  output: {
    file: 'dist/bundle.js',
    format: 'iife'
  },
 
  plugins: [
    brfs()
  ]
};

Options

export type rollupBrfsOptions = {
    // Default:  [".js", ".jsx", ".ts", ".tsx"]
    extensions?: string[]
    // https://github.com/browserify/brfs#var-tr--brfsfile-opts
    brfsOptions?: {}
}

Changelog

See Releases page.

Running tests

Install devDependencies and Run npm test:

npm test

Contributing

Pull requests and stars are always welcome.

For bugs and feature requests, please create an issue.

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Author

License

MIT © azu

Package Sidebar

Install

npm i rollup-plugin-brfs

Weekly Downloads

2

Version

1.0.1

License

MIT

Unpacked Size

8.56 kB

Total Files

7

Last publish

Collaborators

  • azu