clean-terminal-webpack-plugin
Advanced tools
Comparing version 2.0.6 to 2.1.0
12
index.js
@@ -5,6 +5,8 @@ 'use strict'; | ||
constructor(options = {}) { | ||
const { message, onlyInWatchMode = true } = options; | ||
const { message, onlyInWatchMode = true, skipFirstRun = false } = options; | ||
this.message = message; | ||
this.onlyInWatchMode = onlyInWatchMode; | ||
this.skipFirstRun = skipFirstRun; | ||
this.firstRun = true; | ||
} | ||
@@ -25,2 +27,10 @@ | ||
shouldClearConsole(compiler) { | ||
if (this.firstRun) { | ||
this.firstRun = false; | ||
if (this.skipFirstRun) { | ||
return false; | ||
} | ||
} | ||
if (this.onlyInWatchMode) { | ||
@@ -27,0 +37,0 @@ return Boolean(compiler.watchMode); |
{ | ||
"name": "clean-terminal-webpack-plugin", | ||
"version": "2.0.6", | ||
"version": "2.1.0", | ||
"description": "Cleans your terminal output during development to only show the latest build information.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -36,2 +36,3 @@ # Clean Terminal Webpack Plugin | ||
| `onlyInWatchMode` | Boolean | no | `true` | Only clear the screen if webpack is in watch mode | | ||
| `skipFirstRun` | Boolean | no | `false` | Don't clear the screen on first webpack run | | ||
@@ -38,0 +39,0 @@ ## Example |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5365
58
75