clean-terminal-webpack-plugin
Advanced tools
Comparing version 1.0.0 to 1.0.1
31
index.js
'use strict'; | ||
function CleanTerminalPlugin(options = { }) { | ||
const { | ||
message | ||
} = options; | ||
function CleanTerminalPlugin(options = {}) { | ||
const { message } = options; | ||
this.message = message; | ||
this.message = message; | ||
} | ||
CleanTerminalPlugin.prototype.apply = function (compiler) { | ||
compiler.plugin( | ||
'emit', | ||
(_, done) => { | ||
if (process.env.NODE_ENV !== 'production') { | ||
const clear = '\x1B[2J\x1B[3J\x1B[H'; | ||
const output = this.message ? clear + this.message + '\n\n' : clear; | ||
CleanTerminalPlugin.prototype.apply = function(compiler) { | ||
compiler.plugin('emit', (_, done) => { | ||
if (process.env.NODE_ENV !== 'production') { | ||
const clear = '\x1B[2J\x1B[3J\x1B[H'; | ||
const output = this.message ? clear + this.message + '\n\n' : clear; | ||
process.stdout.write(output); | ||
} | ||
process.stdout.write(output); | ||
} | ||
done(); | ||
} | ||
); | ||
done(); | ||
}); | ||
}; | ||
module.exports = CleanTerminalPlugin; | ||
module.exports = CleanTerminalPlugin; |
{ | ||
"name": "clean-terminal-webpack-plugin", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Cleans your terminal output during development to only show the latest build information.", | ||
@@ -29,4 +29,4 @@ "main": "index.js", | ||
"peerDependencies": { | ||
"webpack": "^2.5.0" | ||
"webpack": "^3.0.0" | ||
} | ||
} |
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
3244
16