Commit d4d8b524 authored by rockyl's avatar rockyl

修复

parent ec1114a9
......@@ -5,7 +5,7 @@
Object.defineProperty(exports, "__esModule", { value: true });
const logger_1 = require("./logger");
const imagemin = require("imagemin");
const imageminJpegtran = require("imagemin-mozjpeg");
const imageminJpegtran = require("imagemin-jpegtran");
const imageminPngquant = require("imagemin-pngquant2");
const node_tinify_1 = require("node-tinify");
const acceptTypes = ['image/png', 'image/jpeg'];
......
{"version":3,"file":"api.js","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAEH,qCAA6B;AAE7B,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC,CAAA;AACpC,MAAM,gBAAgB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAA;AACpD,MAAM,gBAAgB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAA;AACtD,6CAAoC;AAEpC,MAAM,WAAW,GAAG,CAAC,WAAW,EAAE,YAAY,CAAC,CAAA;AAE/C,SAAwB,QAAQ,CAAC,MAAM;IACtC,MAAM,CAAC,GAAG,CAAC,OAAO,EAAE,UAAU,GAAG,EAAE,GAAG,EAAE,IAAI;QAC3C,GAAG,CAAC,OAAO,CAAC,8BAA8B,CAAC,CAAA;QAC3C,OAAO,IAAI,EAAE,CAAA;IACd,CAAC,CAAC,CAAA;IAEF,MAAM,CAAC,GAAG,CAAC,gBAAgB,EAAE,UAAU,GAAG,EAAE,GAAG,EAAE,IAAI;QACpD,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;QACjB,OAAO,IAAI,EAAE,CAAA;IACd,CAAC,CAAC,CAAA;IAEF,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,CAAA;IAC9B,MAAM,CAAC,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,CAAA;AACjC,CAAC;AAbD,2BAaC;AAED,KAAK,UAAU,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI;IACnC,IAAI,IAAI,GA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I,EAAE,CAAC;YACP,GAAG,EAAE,iBAAiB;SACtB,CAAC,CAAA;KACF;IACD,OAAO,IAAI,EAAE,CAAA;AACd,CAAC"}
\ No newline at end of file
......@@ -5,7 +5,7 @@
import logger from "./logger"
const imagemin = require("imagemin")
const imageminJpegtran = require("imagemin-mozjpeg")
const imageminJpegtran = require("imagemin-jpegtran")
const imageminPngquant = require("imagemin-pngquant2")
import {compress} from 'node-tinify'
......
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