Son CV dans un terminal web en Javascript! https://terminal-cv.gregandev.fr
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
835 B

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
function _plugin() {
const data = require("@parcel/plugin");
_plugin = function () {
return data;
};
return data;
}
function _utils() {
const data = require("@parcel/utils");
_utils = function () {
return data;
};
return data;
}
var _native = require("../native");
var _default = new (_plugin().Optimizer)({
async optimize({
bundle,
1 year ago
contents
}) {
if (!bundle.env.shouldOptimize) {
return {
contents
};
}
1 year ago
let buffer = await (0, _utils().blobToBuffer)(contents);
let optimized = (0, _native.optimize)(bundle.type, buffer);
return {
1 year ago
contents: optimized.length < buffer.length ? optimized : buffer
};
}
1 year ago
});
1 year ago
exports.default = _default;