From 81ddf9b700bc48a1f8e472209f080f9c1d9a9b09 Mon Sep 17 00:00:00 2001 From: Piotr Russ Date: Wed, 18 Nov 2020 23:26:45 +0100 Subject: rm node_modules --- node_modules/webpack/lib/Generator.js | 60 ----------------------------------- 1 file changed, 60 deletions(-) delete mode 100644 node_modules/webpack/lib/Generator.js (limited to 'node_modules/webpack/lib/Generator.js') diff --git a/node_modules/webpack/lib/Generator.js b/node_modules/webpack/lib/Generator.js deleted file mode 100644 index 655a9b1..0000000 --- a/node_modules/webpack/lib/Generator.js +++ /dev/null @@ -1,60 +0,0 @@ -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ -"use strict"; - -/** @typedef {import("./NormalModule")} NormalModule */ -/** @typedef {import("./RuntimeTemplate")} RuntimeTemplate */ -/** @typedef {import("webpack-sources").Source} Source */ -/** @typedef {import("./Dependency").DependencyTemplate} DependencyTemplate */ - -/** - * - */ -class Generator { - static byType(map) { - return new ByTypeGenerator(map); - } - - /** - * @abstract - * @param {NormalModule} module module for which the code should be generated - * @param {Map} dependencyTemplates mapping from dependencies to templates - * @param {RuntimeTemplate} runtimeTemplate the runtime template - * @param {string} type which kind of code should be generated - * @returns {Source} generated code - */ - generate(module, dependencyTemplates, runtimeTemplate, type) { - throw new Error("Generator.generate: must be overridden"); - } -} - -class ByTypeGenerator extends Generator { - constructor(map) { - super(); - this.map = map; - } - - /** - * @param {NormalModule} module module for which the code should be generated - * @param {Map} dependencyTemplates mapping from dependencies to templates - * @param {RuntimeTemplate} runtimeTemplate the runtime template - * @param {string} type which kind of code should be generated - * @returns {Source} generated code - */ - generate(module, dependencyTemplates, runtimeTemplate, type) { - const generator = this.map[type]; - if (!generator) { - throw new Error(`Generator.byType: no generator specified for ${type}`); - } - return generator.generate( - module, - dependencyTemplates, - runtimeTemplate, - type - ); - } -} - -module.exports = Generator; -- cgit v1.2.3