UNPKG

sol-merger

Version:

Merges all import files into single file.

18 lines 634 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ExportPlugin = void 0; const types_1 = require("../types"); class SPDXLicenseRemovePlugin { constructor() { this.name = 'SPDXLicenseRemovePlugin'; } processExport(e) { const SPDX_COMMENT_REGEX = /SPDX-License-Identifier: .+/g; if (e.type !== types_1.ExportType.comment) { return e; } return Object.assign(Object.assign({}, e), { body: e.body.replace(SPDX_COMMENT_REGEX, '') }); } } exports.ExportPlugin = SPDXLicenseRemovePlugin; //# sourceMappingURL=SPDXLicenseRemovePlugin.js.map