From 3094cb7a038c718b91dc1e600d716f2593e41656 Mon Sep 17 00:00:00 2001 From: ldh Date: Mon, 3 Apr 2023 17:33:49 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=96=B0=E5=BC=95=E5=85=A5mplive-plug?= =?UTF-8?q?in?= 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