From 3094cb7a038c718b91dc1e600d716f2593e41656 Mon Sep 17 00:00:00 2001 From: ldh Date: Mon, 3 Apr 2023 17:33:49 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E9=87=8D=E6=96=B0=E5=BC=95=E5=85=A5mplive-?= =?UTF-8?q?plugin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sheep/libs/mpLive-manifest-plugin.js | 32 ---------------------------- 1 file changed, 32 deletions(-) delete mode 100644 sheep/libs/mpLive-manifest-plugin.js diff --git a/sheep/libs/mpLive-manifest-plugin.js b/sheep/libs/mpLive-manifest-plugin.js deleted file mode 100644 index d1df9bf..0000000 --- a/sheep/libs/mpLive-manifest-plugin.js +++ /dev/null @@ -1,32 +0,0 @@ -const fs = require('fs'); - -const manifestPath = process.env.UNI_INPUT_DIR + '/manifest.json'; - -let Manifest = fs.readFileSync(manifestPath, { - encoding: 'utf-8' -}); - -function mpliveMainfestPlugin(isOpen) { - if (process.env.UNI_PLATFORM !== 'mp-weixin') return; - - const manifestData = JSON.parse(Manifest) - - if (isOpen === '0') { - delete manifestData['mp-weixin'].plugins['live-player-plugin']; - } - - if (isOpen === '1') { - manifestData['mp-weixin'].plugins['live-player-plugin'] = { - "version": "1.3.5", - "provider": "wx2b03c6e691cd7370" - } - } - - Manifest = JSON.stringify(manifestData, null, 2) - - fs.writeFileSync(manifestPath, Manifest, { - "flag": "w" - }) -} - -export default mpliveMainfestPlugin From b187b8c82cc779345cd73bfa3cbc4c95cd8b88d2 Mon Sep 17 00:00:00 2001 From: ldh Date: Mon, 3 Apr 2023 17:34:36 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=E9=87=8D=E6=96=B0=E5=BC=95=E5=85=A5?= =?UTF-8?q?mplive-plugin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sheep/libs/mplive-manifest-plugin.js | 32 ++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 sheep/libs/mplive-manifest-plugin.js diff --git a/sheep/libs/mplive-manifest-plugin.js b/sheep/libs/mplive-manifest-plugin.js new file mode 100644 index 0000000..d1df9bf --- /dev/null +++ b/sheep/libs/mplive-manifest-plugin.js @@ -0,0 +1,32 @@ +const fs = require('fs'); + +const manifestPath = process.env.UNI_INPUT_DIR + '/manifest.json'; + +let Manifest = fs.readFileSync(manifestPath, { + encoding: 'utf-8' +}); + +function mpliveMainfestPlugin(isOpen) { + if (process.env.UNI_PLATFORM !== 'mp-weixin') return; + + const manifestData = JSON.parse(Manifest) + + if (isOpen === '0') { + delete manifestData['mp-weixin'].plugins['live-player-plugin']; + } + + if (isOpen === '1') { + manifestData['mp-weixin'].plugins['live-player-plugin'] = { + "version": "1.3.5", + "provider": "wx2b03c6e691cd7370" + } + } + + Manifest = JSON.stringify(manifestData, null, 2) + + fs.writeFileSync(manifestPath, Manifest, { + "flag": "w" + }) +} + +export default mpliveMainfestPlugin