Rollup support for JSTransformers.
npm install jstransformer-rollup
index.js
import rollup from './other-file'
rollup()
other-file.js
export default function rollup() {
console.log('hi')
}
var rollup = require('jstransformer')(require('jstransformer-rollup'))
rollup.renderFileAsync('index.js', {
// options here passed to rollup.rollup and bundle.generate
// https://github.com/rollup/rollup/wiki/JavaScript-API
}).body
//=> 'function rollup() {\n console.log('hi')\n}\nrollup()'
MIT