Commit 65cecd20 authored by rockyl's avatar rockyl

init

parent cc969935
......@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
const logger_1 = require("./logger");
const imagemin = require("imagemin");
const imageminJpegtran = require("imagemin-jpegtran");
const imageminPngquant = require("imagemin-pngquant");
const imageminPngquant = require("imagemin-pngquant2");
const fs = require('fs-extra');
const acceptTypes = ['image/png', 'image/jpeg'];
function applyApi(server) {
......
{"version":3,"file":"api.js","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAEH,qCAA8B;AAC9B,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AACrC,MAAM,gBAAgB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;AACtD,MAAM,gBAAgB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;AACtD,MAAM,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAE/B,MAAM,WAAW,GAAG,CAAC,WAAW,EAAE,YAAY,CAAC,CAAC;AAEhD,SAAwB,QAAQ,CAAC,MAAM;IACtC,MAAM,CAAC,GAAG,CAAC,OAAO,EAAE,UAAU,GAAG,EAAE,GAAG,EAAE,IAAI;QAC3C,GAAG,CAAC,OAAO,CAAC,8BAA8B,CAAC,CAAC;QAC5C,OAAO,IAAI,EAAE,CAAC;IACf,CAAC,CAAC,CAAC;IAEH,MAAM,CAAC,GAAG,CAAC,gBAAgB,EAAE,UAAU,GAAG,EAAE,GAAG,EAAE,IAAI;QACpD,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAClB,OAAO,IAAI,EAAE,CAAC;IACf,CAAC,CAAC,CAAC;IAEH,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,WAAY,GAAG,EAAE,GAAG,EAAE,IAAI;QACrD,IAAI,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC;QAE1B,IAAG,IAAI,EAAC;YACP,IAAG,WAAW,CA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CAAC;yBACF;qBACD,CAAC,CAAC;oBAEH,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;oBACjC,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE;wBAC3B,cAAc,EAAE,IAAI,CAAC,IAAI;qBACzB,CAAC,CAAC;oBACH,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;iBACjC;gBAAA,OAAO,CAAC,EAAE;oBACV,gBAAM,CAAC,KAAK,CAAC,SAAS,EAAE,iBAAiB,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC;oBACtD,GAAG,CAAC,IAAI,CAAC;wBACR,IAAI,EAAE,CAAC;wBACP,GAAG,EAAE,iBAAiB;qBACtB,CAAC,CAAC;iBACH;aACD;iBAAI;gBACJ,gBAAM,CAAC,KAAK,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;gBACtC,GAAG,CAAC,IAAI,CAAC;oBACR,IAAI,EAAE,CAAC;oBACP,GAAG,EAAE,YAAY;iBACjB,CAAC,CAAC;aACH;SACD;aAAI;YACJ,GAAG,CAAC,IAAI,CAAC;gBACR,IAAI,EAAE,CAAC;gBACP,GAAG,EAAE,iBAAiB;aACtB,CAAC,CAAC;SACH;QAED,OAAO,IAAI,EAAE,CAAC;IACf,CAAC,CAAC,CAAC;AACJ,CAAC;AAvDD,2BAuDC"}
\ No newline at end of file
......@@ -5,7 +5,7 @@
import logger from "./logger";
const imagemin = require("imagemin");
const imageminJpegtran = require("imagemin-jpegtran");
const imageminPngquant = require("imagemin-pngquant");
const imageminPngquant = require("imagemin-pngquant2");
const fs = require('fs-extra');
const acceptTypes = ['image/png', 'image/jpeg'];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment