Skip to content

Instantly share code, notes, and snippets.

@pyrsmk
Created July 23, 2019 14:01
Show Gist options
  • Save pyrsmk/c66ef13843ac11fe6748aef2f8f18003 to your computer and use it in GitHub Desktop.
Save pyrsmk/c66ef13843ac11fe6748aef2f8f18003 to your computer and use it in GitHub Desktop.
Rollup task for Just
const rollup = require('rollup')
const typescript = require('rollup-plugin-typescript2')
const prepack = require('rollup-plugin-prepack-up')
module.exports = async options => {
await rollup.rollup({
input: options.input,
plugins: [
typescript({ useTsconfigDeclarationDir: true }),
prepack(),
],
}).then(bundler => {
bundler.write({
file: options.output,
format: 'umd',
name: options.name,
})
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment