#!/usr/bin/env mew_js const parseFile = function (path) { if (!@.fs.exists(path)) { return; } let content = JSON.parse(@.fs.readFile.sync(path, "utf8")); content.name = "wechat_devtools"; // 开启调试,更新参数 content['chromium-args'] = content['chromium-args'].replace('--disable-devtools', '').replace('--ignore-gpu-blacklist', '--ignore-gpu-blocklist') @.fs.writeFile.sync(path, JSON.stringify(content, null, 4)); }; parseFile(@path(__dirname, "../package.nw/package.json")); parseFile(@path(__dirname, "../package.nw/package-lock.json"));