UNPKG

@codechecks/build-size-watcher

Version:

Keep your build size in check and detect when it gets too big

25 lines 742 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const bytes = require("bytes"); function normalizeOptions(options) { const name = options.name || "Build Size"; return { gzip: options.gzip === undefined ? true : options.gzip, files: options.files.map(normalizeFileDescription), name, artifactName: `build-size:${name}`, }; } exports.normalizeOptions = normalizeOptions; function normalizeFileDescription(file) { let maxSize; if (file.maxSize) { maxSize = bytes.parse(file.maxSize); } return { path: file.path, maxSize, }; } exports.normalizeFileDescription = normalizeFileDescription; //# sourceMappingURL=normalization.js.map