-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfix_final.cjs
More file actions
18 lines (15 loc) 路 1.1 KB
/
Copy pathfix_final.cjs
File metadata and controls
18 lines (15 loc) 路 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
const fs = require('fs');
let content = fs.readFileSync('src/App.tsx', 'utf8');
// The LEFT SIDE FLOATING STACK should be closed before Central Immersive Timer Area
content = content.replace(
/<\/div>\n[\s]*\{\/\* --- CENTRAL IMMERSIVE TIMER AREA ---\*\//,
'</div>\n )}\n\n {/* --- CENTRAL IMMERSIVE TIMER AREA --- */'
);
// Central Immersive Timer Area should be opened and closed properly
content = content.replace(
/\{\/\* --- CENTRAL IMMERSIVE TIMER AREA ---\*\/}\n[\s]*<div className="flex-1 flex items-center justify-center h-full select-none pb-20">\n[\s]*<CentralClock username=\{username\} clockFontClass=\{clockFontClass\} \/>\n[\s]*(<\/div>|<\/div>\n[\s]*\)\})/,
'{/* --- CENTRAL IMMERSIVE TIMER AREA --- */}\n {!isMinimalMode && (\n <div className="flex-1 flex items-center justify-center h-full select-none pb-20">\n <CentralClock username={username} clockFontClass={clockFontClass} />\n </div>\n )}'
);
// If there are stray `)}` anywhere, let's just make sure there are no syntax errors
fs.writeFileSync('src/App.tsx', content);
console.log("Done");