mirror of
https://github.com/msojocs/wechat-web-devtools-linux.git
synced 2025-07-22 00:00:04 +08:00
21 lines
595 B
Plaintext
Executable File
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"));
|