Skip to content

Latest commit

 

History

History
42 lines (30 loc) · 1.25 KB

README.md

File metadata and controls

42 lines (30 loc) · 1.25 KB

jstransformer-rollup

Rollup support for JSTransformers.

Build Status Coverage Status Dependency Status NPM version

Installation

npm install jstransformer-rollup

API

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()'

License

MIT