You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
447 B

import { writeFile } from 'sander';
10 years ago
import Bundle from './Bundle';
export function rollup ( entry, options = {} ) {
const bundle = new Bundle({
entry,
base: options.base || process.cwd()
10 years ago
});
return bundle.collect().then( () => {
return {
generate: options => bundle.generate( options ),
write: ( dest, options ) => {
const generated = bundle.generate( options );
return writeFile( dest, generated.code );
10 years ago
}
};
});
}