-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheck.js
More file actions
46 lines (40 loc) Β· 1.65 KB
/
Copy pathcheck.js
File metadata and controls
46 lines (40 loc) Β· 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
const fs = require('fs');
const path = require('path');
console.log("π Arcapush SYSTEM AUDIT [Arcapush 2.0]");
console.log("-----------------------------------------------");
const filesToCheck = [
{ name: 'app/globals.css', critical: true },
{ name: 'app/layout.tsx', critical: true },
{ name: 'tailwind.config.ts', critical: true },
{ name: 'postcss.config.js', critical: false },
{ name: 'postcss.config.mjs', critical: false },
{ name: 'package.json', critical: true }
];
// 1. Check File Existence
filesToCheck.forEach(file => {
if (fs.existsSync(path.join(process.cwd(), file.name))) {
console.log(`β
FOUND: ${file.name}`);
} else {
console.log(`${file.critical ? 'β MISSING (CRITICAL):' : 'β οΈ MISSING:'} ${file.name}`);
}
});
// 2. Audit tailwind.config.ts Content Paths
if (fs.existsSync('tailwind.config.ts')) {
const config = fs.readFileSync('tailwind.config.ts', 'utf8');
if (config.includes('./src/')) {
console.log("β CONFIG ERROR: Your config still looks for './src/', but your files are in root './app/'.");
} else if (config.includes('./app/')) {
console.log("β
CONFIG OK: Tailwind is looking in the root './app/' folder.");
}
}
// 3. Audit globals.css for Directives
if (fs.existsSync('app/globals.css')) {
const css = fs.readFileSync('app/globals.css', 'utf8');
if (css.includes('@tailwind')) {
console.log("β
CSS OK: @tailwind directives are present.");
} else {
console.log("β CSS ERROR: Your globals.css is missing the @tailwind directives!");
}
}
console.log("-----------------------------------------------");
console.log("π FIX THE β ITEMS, PUSH, AND REDEPLOY WITHOUT CACHE.");