taskr-rollup

raw JSON →
1.0.0 verified Mon Apr 27 auth: no javascript maintenance

Rollup plugin for Taskr (v1.0.0, last released in 2019). Enables Rollup bundling inside Taskr task pipelines. Requires Taskr ^1.1.0 and Rollup 1.x. Aims to provide a simple API for Rollup integration within Taskr's generator-based flow. No active development; last commit years ago. Alternatives include using Rollup standalone or with other build tools.

error Error: Cannot find module 'rollup'
cause Rollup peer dependency not installed or incorrect version
fix
Install rollup@1.x as a dev dependency: npm install rollup@1.0.0
error TypeError: task.source(...).rollup is not a function
cause Taskr version <1.1.0 or plugin not loaded correctly
fix
Ensure taskr >=1.1.0 and require('taskr-rollup') is called as a function in the plugins list.
error RollupError: You must specify an 'output' option
cause Missing 'output' in .rollup() options
fix
Add output object: .rollup({ output: { file: 'bundle.js', format: 'cjs' } })
deprecated Rollup 1.x only; incompatible with Rollup >=2.x
fix Use Rollup 1.x or migrate to another Rollup integration (e.g., directly use rollup or gulp-rollup).
gotcha Generator function required; task must be a generator
fix Use function* (yield) instead of async/await.
gotcha Options 'input' is not supported; use .source() instead
fix Do not pass 'input' in .rollup() options; use .source() to set entry.
breaking Peer dependency taskr must be ^1.1.0; older versions incompatible
fix Upgrade taskr to >=1.1.0 and <2.0.0.
breaking Peer dependency rollup must be 1.x; version 0.x incompatible
fix Use Rollup 1.x (e.g., `npm install rollup@1.0.0`).
npm install taskr-rollup
yarn add taskr-rollup
pnpm add taskr-rollup

Basic Taskr task that bundles src/main.js with Rollup and outputs to dist/bundle.js.

// Taskfile.js
exports.default = function* (task) {
  yield task
    .source('src/main.js')
    .rollup({
      output: { file: 'dist/bundle.js', format: 'cjs' },
      plugins: []
    })
    .target('dist');
};