From a6ed087000d50fb0c9c01ea4527331d2a9793f56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=83=E9=9B=AA=E5=AF=92?= <fanxuehan@hejingguodeMacBook-Pro.local> Date: Mon, 21 Sep 2020 17:57:43 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=88=A0=E9=99=A4=E5=B7=B2=E7=94=9F?= =?UTF-8?q?=E6=88=90=E7=9A=84zip=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + form/package-lock.json | 29 ++++++++++++++++++-- play/settings/builder.json | 54 ++++++++++++++++++++++++++++++++++++++ play/settings/project.json | 4 ++- publish/build.js | 11 ++++++++ 5 files changed, 96 insertions(+), 3 deletions(-) create mode 100644 play/settings/builder.json diff --git a/.gitignore b/.gitignore index 13b7ebf..12d8bad 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ /publish/form +/form/publish/*.zip /publish/play /publish/node_modules /publish/publish/play diff --git a/form/package-lock.json b/form/package-lock.json index b03c7c3..03cfbd1 100644 --- a/form/package-lock.json +++ b/form/package-lock.json @@ -2361,6 +2361,16 @@ "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==", "dev": true }, + "bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "dev": true, + "optional": true, + "requires": { + "file-uri-to-path": "1.0.0" + } + }, "bl": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.2.tgz", @@ -7489,6 +7499,13 @@ "rimraf": "^2.6.1" } }, + "nan": { + "version": "2.14.1", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.1.tgz", + "integrity": "sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw==", + "dev": true, + "optional": true + }, "nanomatch": { "version": "1.2.13", "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", @@ -12190,7 +12207,11 @@ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", "dev": true, - "optional": true + "optional": true, + "requires": { + "bindings": "^1.5.0", + "nan": "^2.12.1" + } }, "is-binary-path": { "version": "1.0.1", @@ -12556,7 +12577,11 @@ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", "dev": true, - "optional": true + "optional": true, + "requires": { + "bindings": "^1.5.0", + "nan": "^2.12.1" + } }, "is-absolute-url": { "version": "3.0.3", diff --git a/play/settings/builder.json b/play/settings/builder.json new file mode 100644 index 0000000..28efc3a --- /dev/null +++ b/play/settings/builder.json @@ -0,0 +1,54 @@ +{ + "title": "play", + "packageName": "org.cocos2d.demo", + "startScene": "57ea7c61-9b8b-498a-b024-c98ee9124beb", + "excludeScenes": [], + "includeSDKBox": false, + "orientation": { + "landscapeLeft": true, + "landscapeRight": true, + "portrait": false, + "upsideDown": false + }, + "webOrientation": "auto", + "inlineSpriteFrames": false, + "inlineSpriteFrames_native": true, + "mainCompressionType": "default", + "mainIsRemote": false, + "optimizeHotUpdate": false, + "md5Cache": false, + "nativeMd5Cache": true, + "encryptJs": true, + "xxteaKey": "af95a0f7-a8da-4f", + "zipCompressJs": true, + "fb-instant-games": {}, + "android": { + "REMOTE_SERVER_ROOT": "", + "packageName": "org.cocos2d.demo" + }, + "ios": { + "REMOTE_SERVER_ROOT": "", + "packageName": "org.cocos2d.demo" + }, + "mac": { + "REMOTE_SERVER_ROOT": "", + "height": 720, + "packageName": "org.cocos2d.demo", + "width": 1280 + }, + "win32": { + "REMOTE_SERVER_ROOT": "", + "height": 720, + "width": 1280 + }, + "android-instant": { + "REMOTE_SERVER_ROOT": "", + "host": "", + "packageName": "org.cocos2d.demo", + "pathPattern": "", + "recordPath": "", + "scheme": "https", + "skipRecord": false + }, + "appBundle": false +} diff --git a/play/settings/project.json b/play/settings/project.json index 0967ef4..a992ddb 100644 --- a/play/settings/project.json +++ b/play/settings/project.json @@ -1 +1,3 @@ -{} +{ + "last-module-event-record-time": 1600677246969 +} diff --git a/publish/build.js b/publish/build.js index 19a9015..196e8be 100644 --- a/publish/build.js +++ b/publish/build.js @@ -38,7 +38,18 @@ async function copyDir(src, dst) { }); } +async function deleteZips() { + const fileList = fs.readdirSync('./publish'); + for (let i = 0; i < fileList.length; i++) { + const name = fileList[i]; + if (name.indexOf('.zip') != -1) { + await fs.unlinkSync(`./publish/${name}`); + } + } +} + async function main() { + await deleteZips(); let date = new Date(); let fileName = `Release_${date.getFullYear()}${fix2(date.getMonth() + 1)}${fix2(date.getDate())} `; fileName += `${fix2(date.getHours())}-${fix2(date.getMinutes())}-${fix2(date.getSeconds())}`; -- 2.21.0