会员个人中心页面初步完成
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const root = path.join(__dirname, '..');
|
||||
const componentsDir = path.join(root, 'components/memberInfo');
|
||||
|
||||
const componentFiles = fs.readdirSync(componentsDir).filter((name) => name.endsWith('.vue'));
|
||||
|
||||
for (const file of componentFiles) {
|
||||
const filePath = path.join(componentsDir, file);
|
||||
let content = fs.readFileSync(filePath, 'utf8').replace(/\r\n/g, '\n');
|
||||
const next = content.replace(/\n<style>[\s\S]*?<\/style>\n?/g, '\n');
|
||||
if (next !== content) {
|
||||
fs.writeFileSync(filePath, next.trimEnd() + '\n', 'utf8');
|
||||
console.log('removed style block:', file);
|
||||
}
|
||||
}
|
||||
|
||||
console.log('done');
|
||||
Reference in New Issue
Block a user