UNPKG

modify-source-webpack-plugin

Version:

Webpack plugin for modifying modules source

46 lines 2.11 kB
"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); exports.__esModule = true; exports.ReplaceOperation = exports.ReplaceOperationType = void 0; var AbstractOperation_1 = require("./AbstractOperation"); var ReplaceOperationType; (function (ReplaceOperationType) { ReplaceOperationType["once"] = "once"; ReplaceOperationType["all"] = "all"; })(ReplaceOperationType = exports.ReplaceOperationType || (exports.ReplaceOperationType = {})); var ReplaceOperation = /** @class */ (function (_super) { __extends(ReplaceOperation, _super); function ReplaceOperation(type, searchValue, replaceValue) { var _this = _super.call(this) || this; _this.type = type; _this.searchValue = searchValue; _this.replaceValue = replaceValue; return _this; } ReplaceOperation.prototype.getSerializableProperties = function () { return ['type', 'searchValue', 'replaceValue']; }; ReplaceOperation.prototype.getTextProperties = function () { return ['searchValue', 'replaceValue']; }; ReplaceOperation.getAllowedTypes = function () { return [ReplaceOperationType.all, ReplaceOperationType.once]; }; return ReplaceOperation; }(AbstractOperation_1.AbstractOperation)); exports.ReplaceOperation = ReplaceOperation; //# sourceMappingURL=ReplaceOperation.js.map