-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcreate-config.js
52 lines (48 loc) · 1.01 KB
/
create-config.js
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
52
import fs from 'fs';
import path from 'path';
console.log('Current working directory:', process.cwd());
const configContent = `// add the names of the themes you want to use here
// warning: you need to specify them in tailwind.config.js as well
// DO NOT REMOVE: 'default', 'light', 'dark'
export default[
'default',
'light',
'dark',
'storm',
'breeze',
'cupcake',
'bumblebee',
'emerald',
'corporate',
'synthwave',
'retro',
'cyberpunk',
'valentine',
'halloween',
'garden',
'forest',
'aqua',
'lofi',
'pastel',
'fantasy',
'wireframe',
'black',
'luxury',
'dracula',
'cmyk',
'autumn',
'business',
'acid',
'lemonade',
'night',
'coffee',
'winter',
] as const;
`
const projectDir = process.env.INIT_CWD;
process.chdir(projectDir);
console.log('Changed working directory:', projectDir);
const filePath = path.join(projectDir, 'theme-manager.config.ts');
fs.mkdirSync('./src', { recursive: true });
fs.writeFileSync(filePath, configContent);
console.log(`Created ${filePath}`);