wechat-web-devtools-linux/tools/fix-package-name

19 lines
410 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";
@.fs.writeFile.sync(path, JSON.stringify(content, null, 4));
};
parseFile(@path(__dirname, "../package.nw/package.json"));
parseFile(@path(__dirname, "../package.nw/package-lock.json"));