初始化仓库

初始化仓库
This commit is contained in:
2026-09-09 13:19:09 +08:00
parent 484d3877aa
commit d36050cff7
3289 changed files with 499918 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
const fs = require('fs');
const files = [
'src/post.html',
'src/index.html',
'src/header-menu.html',
'src/category.html',
'src/user-menu.html'
];
let total = 0;
for (const f of files) {
let c = fs.readFileSync(f, 'utf8');
const before = c;
c = c.replace(/([\w.]+) != ([\w]+)/g, 'not ($1 == $2)');
if (c !== before) {
fs.writeFileSync(f, c);
const diff = (before.match(/!=/g) || []).length;
console.log('✓', f, '替换', diff, '处');
total += diff;
}
}
console.log('共替换', total, '处');