会员个人中心页面初步完成
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const styleDir = path.join(__dirname, '../common/style');
|
||||
|
||||
function walk(dir) {
|
||||
for (const name of fs.readdirSync(dir)) {
|
||||
const full = path.join(dir, name);
|
||||
if (fs.statSync(full).isDirectory()) {
|
||||
walk(full);
|
||||
continue;
|
||||
}
|
||||
if (!name.endsWith('.css')) continue;
|
||||
let css = fs.readFileSync(full, 'utf8');
|
||||
const next = css
|
||||
.replace(/url\(@\/static\/images\//g, 'url(/static/images/')
|
||||
.replace(/url\("@\/static\/images\//g, 'url("/static/images/')
|
||||
.replace(/url\('@\/static\/images\//g, "url('/static/images/");
|
||||
if (next !== css) {
|
||||
fs.writeFileSync(full, next, 'utf8');
|
||||
console.log('fixed', path.relative(styleDir, full));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
walk(styleDir);
|
||||
console.log('done');
|
||||
Reference in New Issue
Block a user