From d3ffc92f6f6fc360f21ef944851eedef435a005f Mon Sep 17 00:00:00 2001 From: ximing Date: Wed, 7 Aug 2019 17:03:34 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BD=BF=E7=94=A8=E9=98=BF=E9=87=8C?= =?UTF-8?q?=E4=BA=91=E7=9A=84=E6=BA=90=20=E8=BF=9B=E8=A1=8C=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E5=8E=8B=E7=BC=A9=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 221 ++++++++++++++++++---------------- package.json | 6 +- src/plugin/copyImagePlugin.js | 4 +- 3 files changed, 119 insertions(+), 112 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6e4515d..5abecc4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "mpbuild", - "version": "1.2.11", + "version": "1.2.14", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -3508,6 +3508,117 @@ "integrity": "sha512-SOhuU4wNBxhhTHxYaiG5NY4HBhDIDnJF60GU+2LqHAdKKer86//e4yg69aENCtQ04n0ovz+tq2YPME5t5yp4pw==", "dev": true }, + "@yeanzhi/imagemin-jpegtran": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@yeanzhi/imagemin-jpegtran/-/imagemin-jpegtran-6.0.0.tgz", + "integrity": "sha512-lBBy5erqI5NZVdSTUseyh+g2M8TRLHimbLbnaw9oEGKNkFyNWsdj1E7aQ247LrUQBI1xvEEkGT2/ScBhsBXxpQ==", + "requires": { + "@yeanzhi/jpegtran-bin": "4.0.0", + "exec-buffer": "3.2.0", + "is-jpg": "2.0.0" + }, + "dependencies": { + "@yeanzhi/jpegtran-bin": { + "version": "4.0.0", + "resolved": "https://registry.npm.taobao.org/@yeanzhi/jpegtran-bin/download/@yeanzhi/jpegtran-bin-4.0.0.tgz", + "integrity": "sha1-FuQr/io6Zet/O8lIWIbOLflTWOs=", + "requires": { + "bin-build": "3.0.0", + "bin-wrapper": "4.1.0", + "logalot": "2.1.0" + } + } + } + }, + "@yeanzhi/imagemin-pngquant": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@yeanzhi/imagemin-pngquant/-/imagemin-pngquant-8.0.0.tgz", + "integrity": "sha512-GVWr2tnwsbDJAshVPoqYjlPkTTu7NDDzDkjlJ5pQjdz5CZkTqpeD6xXJuAf/4wNtqgF2xLXVlNPOWaWPH0FJNg==", + "requires": { + "@yeanzhi/pngquant-bin": "5.0.2", + "execa": "1.0.0", + "is-png": "2.0.0", + "is-stream": "2.0.0", + "ow": "0.13.2" + }, + "dependencies": { + "@yeanzhi/pngquant-bin": { + "version": "5.0.2", + "resolved": "https://registry.npm.taobao.org/@yeanzhi/pngquant-bin/download/@yeanzhi/pngquant-bin-5.0.2.tgz", + "integrity": "sha1-KvaBtBtx86HtVJKJ+k0ai6rT00U=", + "requires": { + "bin-build": "3.0.0", + "bin-wrapper": "4.1.0", + "execa": "0.10.0", + "logalot": "2.1.0" + }, + "dependencies": { + "execa": { + "version": "0.10.0", + "resolved": "https://registry.npm.taobao.org/execa/download/execa-0.10.0.tgz", + "integrity": "sha1-/0Vqj1P5D47MxxqW0Rvfx/CCy1A=", + "requires": { + "cross-spawn": "6.0.5", + "get-stream": "3.0.0", + "is-stream": "1.1.0", + "npm-run-path": "2.0.2", + "p-finally": "1.0.0", + "signal-exit": "3.0.2", + "strip-eof": "1.0.0" + } + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npm.taobao.org/is-stream/download/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" + } + } + }, + "execa": { + "version": "1.0.0", + "resolved": "https://registry.npm.taobao.org/execa/download/execa-1.0.0.tgz", + "integrity": "sha1-xiNqW7TfbW8V6I5/AXeYIWdJ3dg=", + "requires": { + "cross-spawn": "6.0.5", + "get-stream": "4.1.0", + "is-stream": "1.1.0", + "npm-run-path": "2.0.2", + "p-finally": "1.0.0", + "signal-exit": "3.0.2", + "strip-eof": "1.0.0" + }, + "dependencies": { + "get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npm.taobao.org/get-stream/download/get-stream-4.1.0.tgz", + "integrity": "sha1-wbJVV189wh1Zv8ec09K0axw6VLU=", + "requires": { + "pump": "3.0.0" + } + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npm.taobao.org/is-stream/download/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" + } + } + }, + "is-stream": { + "version": "2.0.0", + "resolved": "https://registry.npm.taobao.org/is-stream/download/is-stream-2.0.0.tgz", + "integrity": "sha1-venDJoDW+uBBKdasnZIc54FfeOM=" + }, + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npm.taobao.org/pump/download/pump-3.0.0.tgz", + "integrity": "sha1-tKIRaBW94vTh6mAjVOjHVWUQemQ=", + "requires": { + "end-of-stream": "1.4.1", + "once": "1.4.0" + } + } + } + }, "JSONStream": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", @@ -7498,7 +7609,7 @@ "dependencies": { "globby": { "version": "6.1.0", - "resolved": "https://registry.npm.taobao.org/globby/download/globby-6.1.0.tgz?cache=0&sync_timestamp=1562335642755&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fglobby%2Fdownload%2Fglobby-6.1.0.tgz", + "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", "requires": { "array-union": "1.0.2", @@ -7510,7 +7621,7 @@ "dependencies": { "pify": { "version": "2.3.0", - "resolved": "https://registry.npm.taobao.org/pify/download/pify-2.3.0.tgz", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" } } @@ -11426,73 +11537,6 @@ } } }, - "imagemin-jpegtran": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/imagemin-jpegtran/-/imagemin-jpegtran-6.0.0.tgz", - "integrity": "sha512-Ih+NgThzqYfEWv9t58EItncaaXIHR0u9RuhKa8CtVBlMBvY0dCIxgQJQCfwImA4AV1PMfmUKlkyIHJjb7V4z1g==", - "requires": { - "exec-buffer": "3.2.0", - "is-jpg": "2.0.0", - "jpegtran-bin": "4.0.0" - } - }, - "imagemin-pngquant": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/imagemin-pngquant/-/imagemin-pngquant-8.0.0.tgz", - "integrity": "sha512-PVq0diOxO+Zyq/zlMCz2Pfu6mVLHgiT1GpW702OwVlnej+NhS6ZQegYi3OFEDW8d7GxouyR5e8R+t53SMciOeg==", - "requires": { - "execa": "1.0.0", - "is-png": "2.0.0", - "is-stream": "2.0.0", - "ow": "0.13.2", - "pngquant-bin": "5.0.2" - }, - "dependencies": { - "execa": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", - "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", - "requires": { - "cross-spawn": "6.0.5", - "get-stream": "4.1.0", - "is-stream": "1.1.0", - "npm-run-path": "2.0.2", - "p-finally": "1.0.0", - "signal-exit": "3.0.2", - "strip-eof": "1.0.0" - }, - "dependencies": { - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" - } - } - }, - "get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "requires": { - "pump": "3.0.0" - } - }, - "is-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", - "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==" - }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "requires": { - "end-of-stream": "1.4.1", - "once": "1.4.0" - } - } - } - }, "import-cwd": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/import-cwd/-/import-cwd-2.1.0.tgz", @@ -12868,16 +12912,6 @@ "topo": "3.0.3" } }, - "jpegtran-bin": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jpegtran-bin/-/jpegtran-bin-4.0.0.tgz", - "integrity": "sha512-2cRl1ism+wJUoYAYFt6O/rLBfpXNWG2dUWbgcEkTt5WGMnqI46eEro8T4C5zGROxKRqyKpCBSdHPvt5UYCtxaQ==", - "requires": { - "bin-build": "3.0.0", - "bin-wrapper": "4.1.0", - "logalot": "2.1.0" - } - }, "js-base64": { "version": "2.5.1", "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.5.1.tgz", @@ -15429,33 +15463,6 @@ "integrity": "sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA==", "dev": true }, - "pngquant-bin": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/pngquant-bin/-/pngquant-bin-5.0.2.tgz", - "integrity": "sha512-OLdT+4JZx5BqE1CFJkrvomYV0aSsv6x2Bba+aWaVc0PMfWlE+ZByNKYAdKeIqsM4uvW1HOSEHnf8KcOnykPNxA==", - "requires": { - "bin-build": "3.0.0", - "bin-wrapper": "4.1.0", - "execa": "0.10.0", - "logalot": "2.1.0" - }, - "dependencies": { - "execa": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.10.0.tgz", - "integrity": "sha512-7XOMnz8Ynx1gGo/3hyV9loYNPWM94jG3+3T3Y8tsfSstFmETmENCMU/A/zj8Lyaj1lkgEepKepvd6240tBRvlw==", - "requires": { - "cross-spawn": "6.0.5", - "get-stream": "3.0.0", - "is-stream": "1.1.0", - "npm-run-path": "2.0.2", - "p-finally": "1.0.0", - "signal-exit": "3.0.2", - "strip-eof": "1.0.0" - } - } - } - }, "posix-character-classes": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", diff --git a/package.json b/package.json index e4d0668..ab9e799 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mpbuild", - "version": "1.2.12", + "version": "1.2.14", "description": "", "main": "src/index.js", "scripts": { @@ -62,8 +62,8 @@ "htmlparser2": "^3.10.1", "del": "^4.1.1", "imagemin": "^6.1.0", - "imagemin-jpegtran": "^6.0.0", - "imagemin-pngquant": "^8.0.0", + "@yeanzhi/imagemin-jpegtran": "^6.0.0", + "@yeanzhi/imagemin-pngquant": "^8.0.0", "jsonlint": "^1.6.3", "jsonminify": "^0.4.1", "lodash": "^4.17.11", diff --git a/src/plugin/copyImagePlugin.js b/src/plugin/copyImagePlugin.js index c262c68..45f6a0f 100644 --- a/src/plugin/copyImagePlugin.js +++ b/src/plugin/copyImagePlugin.js @@ -3,8 +3,8 @@ */ const path = require('path'); const imagemin = require('imagemin'); -const imageminJpegtran = require('imagemin-jpegtran'); -const imageminPngquant = require('imagemin-pngquant'); +const imageminJpegtran = require('@yeanzhi/imagemin-jpegtran'); +const imageminPngquant = require('@yeanzhi/imagemin-pngquant'); module.exports = class CopyImagePlugin { constructor(options) {