source: imaps-frontend/node_modules/webpack/lib/cache/AddManagedPathsPlugin.js@ 79a0317

main
Last change on this file since 79a0317 was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 4 days ago

F4 Finalna Verzija

  • Property mode set to 100644
File size: 1.1 KB
Line 
1/*
2 MIT License http://www.opensource.org/licenses/mit-license.php
3 Author Tobias Koppers @sokra
4*/
5
6"use strict";
7
8/** @typedef {import("../Compiler")} Compiler */
9
10class AddManagedPathsPlugin {
11 /**
12 * @param {Iterable<string | RegExp>} managedPaths list of managed paths
13 * @param {Iterable<string | RegExp>} immutablePaths list of immutable paths
14 * @param {Iterable<string | RegExp>} unmanagedPaths list of unmanaged paths
15 */
16 constructor(managedPaths, immutablePaths, unmanagedPaths) {
17 this.managedPaths = new Set(managedPaths);
18 this.immutablePaths = new Set(immutablePaths);
19 this.unmanagedPaths = new Set(unmanagedPaths);
20 }
21
22 /**
23 * Apply the plugin
24 * @param {Compiler} compiler the compiler instance
25 * @returns {void}
26 */
27 apply(compiler) {
28 for (const managedPath of this.managedPaths) {
29 compiler.managedPaths.add(managedPath);
30 }
31 for (const immutablePath of this.immutablePaths) {
32 compiler.immutablePaths.add(immutablePath);
33 }
34 for (const unmanagedPath of this.unmanagedPaths) {
35 compiler.unmanagedPaths.add(unmanagedPath);
36 }
37 }
38}
39
40module.exports = AddManagedPathsPlugin;
Note: See TracBrowser for help on using the repository browser.