-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscripts.ts
53 lines (45 loc) · 1.38 KB
/
scripts.ts
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
53
import getProjectName from "./InputModules/getProjectName";
import getLanguages from "./InputModules/getLanguages";
import getTemplate from "./InputModules/getTemplate";
import getStyleLibrary from "./InputModules/getStyleLibrary";
import builder from "../builder";
import stylishPrint from "./stylePrint";
import { basename } from "path";
// package installer
const scriptsRunner = async function () {
const projectNameResponse = await getProjectName(); // Prompt for the project name
const languageNameResponse = await getLanguages(); // Select language
const templateNameResponse = await getTemplate(); // select library
const styleLibraryResponse = await getStyleLibrary(); // select styling library
await builder({
projectNameResponse,
languageNameResponse,
templateNameResponse,
styleLibraryResponse,
});
if (projectNameResponse.isNew) {
stylishPrint(
`
'${projectNameResponse.ProjectName}' is ready to go.
Next steps:
📂 ${" "} cd ${projectNameResponse.ProjectName}
📂 ${" "} npm install
📂 ${" "} npm start
Happy Hacking 🚀
`,
"white"
);
} else {
stylishPrint(
`
'${basename(process.cwd())}' is ready to go.
Next steps:
📂 ${" "} npm install
📂 ${" "} npm start
Happy Hacking 🚀
`,
"white"
);
}
};
export default scriptsRunner;