Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including nyan-progress-webpack-plugin with all npm packages installed. Try it out:

require("webpack/package.json"); // webpack is a peer dependency. var nyanProgressWebpackPlugin = require("nyan-progress-webpack-plugin")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

nyan-progress-webpack-plugin v1.2.0

Meow

nyan-progress-webpack-plugin

Meow

Install

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

Usage

Add this to your webpack plugin:

var NyanProgressPlugin = require('nyan-progress-webpack-plugin');

...

plugins: [
  new NyanProgressPlugin()  
]

...

NB: use webpack.ProgressPlugin carefully with this plugin. If you used it just for progress logging, you can remove it.

Options

new NyanProgressPlugin(options)
NameSignatureDefault ValueDescription
loggerfunction(message, ...)console.logFunction used for logging
hookStdoutBooleantrueIf true, patches process.stdout.write during progress and counts extraneous log messages, to position Nyan Cat properly
getProgressMessagefunction(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 === 1 && 'Nyan!'Override this function to define what nyan cat is saying
restoreCursorPositionBooleanfalseEnable this flag, if your terminal supports saving/restoring cursor position, for better output handling
RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free