Code coverage report for lib\SingleEntryPlugin.js

Statements: 100% (12 / 12)      Branches: 100% (0 / 0)      Functions: 100% (4 / 4)      Lines: 100% (12 / 12)      Ignored: none     

All files » lib\ » SingleEntryPlugin.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22        1   1 505 505 505   1 1 505 525   525   505 510    
/*
	MIT License http://www.opensource.org/licenses/mit-license.php
	Author Tobias Koppers @sokra
*/
var SingleEntryDependency = require("./dependencies/SingleEntryDependency");
 
function SingleEntryPlugin(context, entry, name) {
	this.context = context;
	this.entry = entry;
	this.name = name;
}
module.exports = SingleEntryPlugin;
SingleEntryPlugin.prototype.apply = function(compiler) {
	compiler.plugin("compilation", function(compilation, params) {
		var normalModuleFactory = params.normalModuleFactory;
 
		compilation.dependencyFactories.set(SingleEntryDependency, normalModuleFactory);
	});
	compiler.plugin("make", function(compilation, callback) {
		compilation.addEntry(this.context, new SingleEntryDependency(this.entry), this.name, callback);
	}.bind(this));
};