wechat-web-devtools-linux/tools/fix-package-name
2022-01-23 12:01:05 +08:00

21 lines
595 B
Plaintext
Executable File

#!/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"));