#!/usr/bin/env node /** * D15: traditional.vue 传统天盘页清理 (debt 72) * script 五行/数字/五维色板全部收编 BrandColors(含 import) * template 头像 fallback 绑定 data * style #FFF8F0 -> $dim-body-tint */ const fs = require('fs'); const F = 'pages/tianpan/traditional.vue'; let src = fs.readFileSync(F, 'utf8'); let replaced = 0; function repl(from, to) { const cnt = src.split(from).length - 1; if (cnt === 0) { console.warn('NOT FOUND:', from.slice(0, 90)); return; } src = src.split(from).join(to); replaced += cnt; } // ---- 1. import(接在首个 import 后)---- const m = src.match(/