From dadf80d1739e22dcf16aaec885d70096a967a53f Mon Sep 17 00:00:00 2001 From: kiccer <1072907338@qq.com> Date: Mon, 1 Apr 2024 21:48:01 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=88=20perf:=20=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- miniprogram/pnpm-lock.yaml | 31 +++++++++ miniprogram_dist/WxCanvas2d.js | 2 +- miniprogram_dist/series/Arc.js | 2 +- miniprogram_dist/series/Blur.js | 2 +- miniprogram_dist/series/Image.js | 2 +- miniprogram_dist/series/Line.js | 2 +- miniprogram_dist/series/Qrcode.js | 2 +- miniprogram_dist/series/Rect.js | 2 +- miniprogram_dist/series/Text.js | 2 +- miniprogram_dist/utils/Debugger.js | 2 +- miniprogram_dist/utils/SaveToAlbum.js | 2 +- package.json | 2 +- plugin/WxCanvas2d.js | 4 +- project.config.json | 91 +++++++++++++++------------ project.private.config.json | 30 ++++----- 15 files changed, 105 insertions(+), 73 deletions(-) create mode 100644 miniprogram/pnpm-lock.yaml diff --git a/miniprogram/pnpm-lock.yaml b/miniprogram/pnpm-lock.yaml new file mode 100644 index 0000000..1ec44a1 --- /dev/null +++ b/miniprogram/pnpm-lock.yaml @@ -0,0 +1,31 @@ +lockfileVersion: '6.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +dependencies: + '@vant/weapp': + specifier: ^1.5.2 + version: 1.11.4 + numeral: + specifier: ^2.0.6 + version: 2.0.6 + wx-canvas-2d: + specifier: ^2.4.0 + version: 2.5.0 + +packages: + + /@vant/weapp@1.11.4: + resolution: {integrity: sha512-egOsWO4hVMP1SQSqQ46jy8UD3WysvlnUecRzPM21Y3ovkOFZ6wlaO7oHQmTXRpwr+V41Qri1qEbtNjhVxFqdyw==} + dev: false + + /numeral@2.0.6: + resolution: {integrity: sha512-qaKRmtYPZ5qdw4jWJD6bxEf1FJEqllJrwxCLIm0sQU/A7v2/czigzOb+C2uSiFsa9lBUzeH7M1oK+Q+OLxL3kA==} + dev: false + + /wx-canvas-2d@2.5.0: + resolution: {integrity: sha512-P52ummKpu/q77C9eLE7ESvBJLqkjTGBX7+0Ny79PLN0Npsqb2tikIv1dzZS4V9VYvrI8mvdJhKtezwtxFP/nbQ==} + requiresBuild: true + dev: false diff --git a/miniprogram_dist/WxCanvas2d.js b/miniprogram_dist/WxCanvas2d.js index d84bc2e..4982d34 100644 --- a/miniprogram_dist/WxCanvas2d.js +++ b/miniprogram_dist/WxCanvas2d.js @@ -1 +1 @@ -"use strict";function _toConsumableArray(t){return _arrayWithoutHoles(t)||_iterableToArray(t)||_unsupportedIterableToArray(t)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(t,e){if(t){if("string"==typeof t)return _arrayLikeToArray(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(t,e):void 0}}function _iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}function _arrayLikeToArray(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);rt.length)&&(e=t.length);for(var r=0,n=new Array(e);rt.length)&&(r=t.length);for(var e=0,i=new Array(r);eo?s/t.height*t.width/u:1):"aspectFill"===y&&(a=t.width/t.height>o?u/t.width*t.height/s:1,n=t.width/t.heightt.length)&&(r=t.length);for(var e=0,i=new Array(r);ei?c/t.height*t.width/d:1):"aspectFill"===u&&(o=t.width/t.height>i?d/t.width*t.height/c:1,a=t.width/t.heightr.length)&&(t=r.length);for(var e=0,n=new Array(t);er.length)&&(t=r.length);for(var e=0,n=new Array(t);ew&&((z=z.slice(0,w))[w-1]=z[w-1].slice(0,-1)+"..."),z.forEach(function(t,i){b.ctx.fillText(t,b.xDpr({left:o,start:o,right:o+s,end:o+s,center:o+s/2}[u]||o),b.xDpr(c+E*i+(E-x)/2))}),t()})}}; \ No newline at end of file +"use strict";module.exports={name:"Text",handler:function(){var p=this,u=0f&&((g=g.slice(0,f))[f-1]=g[f-1].slice(0,-1)+"..."),g.forEach(function(t,i){p.ctx.fillText(t,p.xDpr({left:o,start:o,right:o+a,end:o+a,center:o+a/2}[d]||o),p.xDpr(n+s*i+(s-l)/2))}),t()})}}; \ No newline at end of file diff --git a/miniprogram_dist/utils/Debugger.js b/miniprogram_dist/utils/Debugger.js index 20d1efb..55e795e 100644 --- a/miniprogram_dist/utils/Debugger.js +++ b/miniprogram_dist/utils/Debugger.js @@ -1 +1 @@ -"use strict";var SYS_INFO=wx.getSystemInfoSync();module.exports={name:"debugLogout",handler:function(n){var o=1 this.xDpr(n))) diff --git a/project.config.json b/project.config.json index cc026ba..5b9bf67 100644 --- a/project.config.json +++ b/project.config.json @@ -1,44 +1,53 @@ { - "miniprogramRoot": "miniprogram/", - "pluginRoot": "plugin/", - "compileType": "plugin", - "setting": { - "urlCheck": false, - "es6": true, - "enhance": false, - "postcss": true, - "preloadBackgroundData": false, - "minified": true, - "newFeature": false, - "coverView": true, - "nodeModules": true, - "autoAudits": false, - "showShadowRootInWxmlPanel": true, - "scopeDataCheck": false, - "uglifyFileName": false, - "checkInvalidKey": true, - "checkSiteMap": true, - "uploadWithSourceMap": true, - "compileHotReLoad": false, - "useMultiFrameRuntime": true, - "useApiHook": true, - "useApiHostProcess": true, - "babelSetting": { - "ignore": [], - "disablePlugins": [], - "outputPath": "" - }, - "useIsolateContext": true, - "userConfirmedBundleSwitch": false, - "packNpmManually": false, - "packNpmRelationList": [], - "minifyWXSS": true, - "showES6CompileOption": false + "miniprogramRoot": "miniprogram/", + "pluginRoot": "plugin/", + "compileType": "plugin", + "setting": { + "urlCheck": false, + "es6": true, + "enhance": false, + "postcss": true, + "preloadBackgroundData": false, + "minified": true, + "newFeature": false, + "coverView": true, + "nodeModules": true, + "autoAudits": false, + "showShadowRootInWxmlPanel": true, + "scopeDataCheck": false, + "uglifyFileName": false, + "checkInvalidKey": true, + "checkSiteMap": true, + "uploadWithSourceMap": true, + "compileHotReLoad": false, + "useMultiFrameRuntime": true, + "useApiHook": true, + "useApiHostProcess": true, + "babelSetting": { + "ignore": [], + "disablePlugins": [], + "outputPath": "" }, - "appid": "wx9da882c106b9ab9f", - "projectname": "wx-canvas-2d", - "simulatorType": "wechat", - "simulatorPluginLibVersion": {}, - "libVersion": "2.13.2", - "condition": {} + "useIsolateContext": true, + "userConfirmedBundleSwitch": false, + "packNpmManually": false, + "packNpmRelationList": [], + "minifyWXSS": true, + "showES6CompileOption": false + }, + "appid": "wx9da882c106b9ab9f", + "projectname": "wx-canvas-2d", + "simulatorType": "wechat", + "simulatorPluginLibVersion": {}, + "libVersion": "2.13.2", + "condition": {}, + "srcMiniprogramRoot": "miniprogram/", + "packOptions": { + "ignore": [], + "include": [] + }, + "editorSetting": { + "tabIndent": "insertSpaces", + "tabSize": 2 + } } \ No newline at end of file diff --git a/project.private.config.json b/project.private.config.json index 97180c3..99270ec 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -1,23 +1,15 @@ { - "condition": { - "plugin": { - "list": [ - { - "name": "pages/npm-test/index", - "pathName": "pages/npm-test/index", - "query": "", - "scene": null - } - ] - }, - "game": { - "list": [] - }, - "gamePlugin": { - "list": [] - }, - "miniprogram": { - "list": [] + "condition": { + "plugin": { + "list": [ + { + "name": "pages/npm-test/index", + "pathName": "pages/npm-test/index", + "query": "", + "scene": null } + ] } + }, + "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html" } \ No newline at end of file