-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.js
More file actions
51 lines (47 loc) · 1.31 KB
/
setup.js
File metadata and controls
51 lines (47 loc) · 1.31 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
47
48
49
50
51
const fs = require('fs');
const path = require('path');
const directories = [
'client',
'client/public',
'client/src',
'client/src/assets',
'client/src/components',
'client/src/features',
'client/src/features/Auth',
'client/src/features/Dashboard',
'client/src/features/Questions',
'client/src/features/CodingPlayground',
'client/src/features/Tests',
'client/src/features/Forum',
'client/src/features/AIChatbot',
'client/src/pages',
'client/src/context',
'client/src/services',
'client/src/utils',
'server',
'server/config',
'server/controllers',
'server/models',
'server/routes',
'server/middleware',
'server/utils',
'ai-services',
'docker'
];
// Create directories
directories.forEach(dir => {
const dirPath = path.join(__dirname, dir);
if (!fs.existsSync(dirPath)) {
fs.mkdirSync(dirPath, { recursive: true });
console.log(`Created directory: ${dir}`);
}
});
// Create .gitkeep files to preserve empty directories
directories.forEach(dir => {
const gitkeepPath = path.join(__dirname, dir, '.gitkeep');
if (!fs.existsSync(gitkeepPath)) {
fs.writeFileSync(gitkeepPath, '');
console.log(`Created .gitkeep in: ${dir}`);
}
});
console.log('Directory structure setup complete!');