add info del and info if found unk var

This commit is contained in:
Akbar Yahya 2022-11-12 17:23:17 +08:00
parent dcdadb1fb8
commit 503921ad83
No known key found for this signature in database
GPG Key ID: 0C9985FEC5C018C9

8
op.js
View File

@ -451,6 +451,10 @@ function clean_proto_gen() {
const read = fs.readFileSync(file);
var rd = read.toString();
if (file.match("Unk")) {
console.log("unk: " + file);
}
// find import
while ((m = regex.exec(rd)) !== null) {
// This is necessary to avoid infinite loops with zero-width matches
@ -465,6 +469,9 @@ function clean_proto_gen() {
if (found_rt) {
//console.log(`Skip ${match}`);
} else {
if (match.match("Unk") || file.match("Unk")) {
console.log(file + " require " + match);
}
var subdata = new Object();
subdata["name"] = match;
file_toaddmore.push(subdata);
@ -505,6 +512,7 @@ function clean_proto_gen() {
if (todoremove) {
found_needclean++;
console.log("Remove file: "+file);
try {
fs.unlinkSync(file);
//file removed