一覧へ戻る
frantic1048/fly-rollup(新しいタブで開きます)
主要言語: JavaScript
Rollup plugin for Fly.
- star 数
- 5
- watcher 数
- 1
- fork 数
- 1
- issue 数
- 0
- 最終更新
- 2017/03/28
主要言語: JavaScript
Rollup plugin for Fly.
This plugin requires Fly .
npm i --save-dev fly-rollup
Async/Await flavored:
export async function roll (fly) { await fly .source('src/entry.js') // just pass your entry file(s) here .rollup({ rollup: { // rollup options plugins: [ require('rollup-plugin-babel')() ] }, bundle: { // bundle options format: 'es' } }) .target('dist') }
Generator function flavored:
exports.roll = function * (fly) { yield fly .source('src/entry.js') // just pass your entry file(s) here .rollup({ rollup: { // rollup options plugins: [ require('rollup-plugin-babel')() ] }, bundle: { // bundle options format: 'es' } }) .target('dist') }
You just need to pass entry files to fly-rollup .
Sourcemap is controlled by sourceMap key in bundle options. It has 3 options:
true: default value, generate external sourcemap along with bundle output.'inline': inline sourcemap.false: disable sourcemap.e.g.
fly.source .rollup({ bundle: { sourceMap: false // disable sourcemap } })
For other options:
See Rollup JavaScript API#rollup.rollup( options ) for rollup options .
See Rollup JavaScript API#bundle.generate( options ) for bundle options .