-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.js
executable file
·33 lines (29 loc) · 859 Bytes
/
setup.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
#!/usr/bin/env node
import generateFileStructure from './src/fileStructure.js';
import installDependencies from './src/dependencies.js';
import { getIndexContent } from './src/files/index.js';
import {
getPackageContent,
getEnvDetails,
getConfigDetails,
} from './src/files/global.js';
import { getLandingPage } from './src/files/landing.js';
import { getSrcFiles } from './src/files/srcFiles.js';
const generateModule = () => {
const baseDir = process.cwd();
const structure = {
'index.js': getIndexContent(),
'src': getSrcFiles(),
'env-example.txt': getEnvDetails(),
'public': {
'index.html' : getLandingPage(),
},
'config' : {
'config.js' : getConfigDetails(),
},
'package.json': getPackageContent(),
};
generateFileStructure(baseDir, structure);
installDependencies();
};
generateModule();