rollup-plugin-progressbar

0.1.0 • Public • Published

rollup-plugin-progressbar

Show current module being transpiled by the rollup bundler.

Installation

npm i rollup-plugin-progressbar --save-dev

Usage

Include the following in the rollup config

Modern mode:

import { rollup } from 'rollup';
import progressbar from 'rollup-plugin-progressbar';
 
rollup({
  entry: 'main.js',
  plugins: [
    progressbar(),
  ],
}).then(bundle => bundle.write({ dest: 'bundle.js', format: 'iife' }));

With custom settings:

import { rollup } from 'rollup';
import progressbar from 'rollup-plugin-progressbar';
 
rollup({
  entry: 'main.js',
  plugins: [
    progressbar({
      modern: {
        format: '({value}/{total}): {file} {bar} {percentage}%', // default: 'Building... {bar} {percentage}% ({value}/{total}): {file}'
        preset: 'classic', // default: 'shades-grey'
      }
    }),
  ],
}).then(bundle => bundle.write({ dest: 'bundle.js', format: 'iife' }));

Legacy mode:

import { rollup } from 'rollup';
import progressbar from 'rollup-plugin-progressbar';
 
rollup({
  entry: 'main.js',
  plugins: [
    progressbar({
      modern: false, // default: true
      clearLine: false, // default: true
    }),
  ],
}).then(bundle => bundle.write({ dest: 'bundle.js', format: 'iife' }));

Package Sidebar

Install

npm i rollup-plugin-progressbar

Weekly Downloads

11

Version

0.1.0

License

MIT

Unpacked Size

11.2 kB

Total Files

5

Last publish

Collaborators

  • thiagozanetti