1.0.1 • Published 6 years ago
rollup-plugin-brfs v1.0.1
rollup-plugin-brfs 
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-brfsUsage
// 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 testContributing
Pull requests and stars are always welcome.
For bugs and feature requests, please create an issue.
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature - Commit your changes:
git commit -am 'Add some feature' - Push to the branch:
git push origin my-new-feature - Submit a pull request :D
Author
License
MIT © azu
1.0.1
6 years ago