Code coverage report for lib\MovedToPluginWarningPlugin.js

Statements: 100% (9 / 9)      Branches: 100% (0 / 0)      Functions: 100% (3 / 3)      Lines: 100% (9 / 9)      Ignored: none     

All files » lib\ » MovedToPluginWarningPlugin.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18        1 28 28   1   1 28 28 28 35      
/*
	MIT License http://www.opensource.org/licenses/mit-license.php
	Author Tobias Koppers @sokra
*/
function MovedToPluginWarningPlugin(optionName, pluginName) {
	this.optionName = optionName;
	this.pluginName = pluginName
}
module.exports = MovedToPluginWarningPlugin;
 
MovedToPluginWarningPlugin.prototype.apply = function(compiler) {
	var optionName = this.optionName;
	var pluginName = this.pluginName
	compiler.plugin("compilation", function(compilation) {
		compilation.warnings.push(new Error("webpack options:\nDEPRECATED option '" + optionName + "' will be moved to the " + pluginName + ". Use this by now.\nFor more info about the usage of the " + pluginName + " see http://webpack.github.io/docs/webpack-plugins.html"));
	});
};