summaryrefslogtreecommitdiff
path: root/node_modules/webpack/lib/DependencyTemplate.js
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2023-11-05 17:16:09 +0800
committerlittleblack111 <littleblack11111@gmail.com>2023-11-05 17:16:09 +0800
commitd1d9f00b1bd660842addf5e6b1d1b64c852a9eea (patch)
tree60fb37ae73a1109d95301de5ec9b61b5726a4b61 /node_modules/webpack/lib/DependencyTemplate.js
parent7c85166c4cbdd862fc4252007d2df5befcbc2a58 (diff)
added hover prefixer
Diffstat (limited to 'node_modules/webpack/lib/DependencyTemplate.js')
-rw-r--r--node_modules/webpack/lib/DependencyTemplate.js57
1 files changed, 57 insertions, 0 deletions
diff --git a/node_modules/webpack/lib/DependencyTemplate.js b/node_modules/webpack/lib/DependencyTemplate.js
new file mode 100644
index 00000000..67a4d7b8
--- /dev/null
+++ b/node_modules/webpack/lib/DependencyTemplate.js
@@ -0,0 +1,57 @@
+/*
+ MIT License http://www.opensource.org/licenses/mit-license.php
+ Author Tobias Koppers @sokra
+*/
+
+"use strict";
+
+/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */
+/** @typedef {import("./ChunkGraph")} ChunkGraph */
+/** @typedef {import("./CodeGenerationResults")} CodeGenerationResults */
+/** @typedef {import("./ConcatenationScope")} ConcatenationScope */
+/** @typedef {import("./Dependency")} Dependency */
+/** @typedef {import("./Dependency").RuntimeSpec} RuntimeSpec */
+/** @typedef {import("./DependencyTemplates")} DependencyTemplates */
+/** @typedef {import("./Generator").GenerateContext} GenerateContext */
+/** @template T @typedef {import("./InitFragment")<T>} InitFragment */
+/** @typedef {import("./Module")} Module */
+/** @typedef {import("./ModuleGraph")} ModuleGraph */
+/** @typedef {import("./RuntimeTemplate")} RuntimeTemplate */
+
+/**
+ * @typedef {Object} DependencyTemplateContext
+ * @property {RuntimeTemplate} runtimeTemplate the runtime template
+ * @property {DependencyTemplates} dependencyTemplates the dependency templates
+ * @property {ModuleGraph} moduleGraph the module graph
+ * @property {ChunkGraph} chunkGraph the chunk graph
+ * @property {Set<string>} runtimeRequirements the requirements for runtime
+ * @property {Module} module current module
+ * @property {RuntimeSpec} runtime current runtimes, for which code is generated
+ * @property {InitFragment<GenerateContext>[]} initFragments mutable array of init fragments for the current module
+ * @property {ConcatenationScope=} concatenationScope when in a concatenated module, information about other concatenated modules
+ * @property {CodeGenerationResults} codeGenerationResults the code generation results
+ */
+
+/**
+ * @typedef {Object} CssDependencyTemplateContextExtras
+ * @property {Map<string, string>} cssExports the css exports
+ */
+
+/** @typedef {DependencyTemplateContext & CssDependencyTemplateContextExtras} CssDependencyTemplateContext */
+
+class DependencyTemplate {
+ /* istanbul ignore next */
+ /**
+ * @abstract
+ * @param {Dependency} dependency the dependency for which the template should be applied
+ * @param {ReplaceSource} source the current replace source which can be modified
+ * @param {DependencyTemplateContext} templateContext the context object
+ * @returns {void}
+ */
+ apply(dependency, source, templateContext) {
+ const AbstractMethodError = require("./AbstractMethodError");
+ throw new AbstractMethodError();
+ }
+}
+
+module.exports = DependencyTemplate;