node package manager

jstransformer-rollup

Rollup support for JSTransformers.

jstransformer-rollup

Rollup support for JSTransformers.

Build Status Coverage Status Dependency Status NPM version

Installation

npm install jstransformer-rollup

API

index.js

import foo from './other-file'
foo()

other-file.js

export default function foo() {
  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 foo() {\n  console.log('hi')\n}\nfoo()' 

License

MIT