DefinitelyTyped/types/rollup/rollup-tests.ts
2017-05-09 11:32:24 +02:00

24 lines
359 B
TypeScript

import { rollup, Bundle } from 'rollup'
let cache: Bundle | undefined
async function main() {
const bundle = await rollup({
entry: 'main.js',
cache,
})
const result = bundle.generate({
format: 'cjs',
})
cache = bundle
await bundle.write({
format: 'cjs',
dest: 'bundle.js',
})
}
main()