Code coverage report for lib\node\NodeTemplatePlugin.js

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

All files » lib\node\ » NodeTemplatePlugin.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23        1 1 1   1   451 451   1 1 451 451 451 451 451      
/*
	MIT License http://www.opensource.org/licenses/mit-license.php
	Author Tobias Koppers @sokra
*/
var NodeMainTemplatePlugin = require("./NodeMainTemplatePlugin");
var NodeChunkTemplatePlugin = require("./NodeChunkTemplatePlugin");
var NodeHotUpdateChunkTemplatePlugin = require("./NodeHotUpdateChunkTemplatePlugin");
 
function NodeTemplatePlugin(options, asyncChunkLoading) {
	// TODO remove options parameter
	this.options = options;
	this.asyncChunkLoading = asyncChunkLoading;
}
module.exports = NodeTemplatePlugin;
NodeTemplatePlugin.prototype.apply = function(compiler) {
	var options = this.options;
	compiler.plugin("this-compilation", function(compilation) {
		compilation.mainTemplate.apply(new NodeMainTemplatePlugin(this.asyncChunkLoading));
		compilation.chunkTemplate.apply(new NodeChunkTemplatePlugin());
		compilation.hotUpdateChunkTemplate.apply(new NodeHotUpdateChunkTemplatePlugin());
	}.bind(this));
};