2.0.2 • Published 3 years ago

nyan-styled-progress-webpack-plugin v2.0.2

Weekly downloads
1,936
License
ISC
Repository
github
Last release
3 years ago

nyan-styled-progress-webpack-plugin

Meow (forked from Alexkuz)

Install

$ npm i -D nyan-styled-progress-webpack-plugin

$ yarn add nyan-styled-progress-wegpack-plugin --dev

Usage

// weback.config.js
const webpack = require("webpack");
const NyanStyledProgressPlugin = require("nyan-styled-progress-webpack-plugin");

module.exports = {
  plugins: [new NyanStyledProgressPlugin(options)],
};
This plugin uses webpack progress-plugin under the hood.

Options

NametypeDefaultDescription
loggerFunctionconsole.logUsed for logging messages to command line
widthNumberprocess.stdout.columnsHelps determine the width of nyan cat and rainbow
hookStdoutBooleantrueIf true, patches process.stdout.write during progress and counts extraneous log messages, to position Nyan Cat properly
getProgressMessageFunction(progress, messages, styles)(progress, messages, styles) => {}Gets custom progress message. styles is provided for convenience (exported from ansi-styles module)
debounceIntervalNumber180Defines how often getProgressMessage is called (in milliseconds)
nyanCatSaysFunction(progress, messages)(progress, messages) => {}function to define what nyan cat is saying
restoreCursorPositionBooleanfalseEnable this flag, if your terminal supports saving/restoring cursor position, for better output handling