tylersong 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +45 -0
- package/package.json +15 -0
package/index.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import inquirer from "inquirer";
|
|
4
|
+
import chalk from "chalk";
|
|
5
|
+
|
|
6
|
+
const main = async () => {
|
|
7
|
+
// 도움말 옵션 체크
|
|
8
|
+
if (process.argv.includes("--help")) {
|
|
9
|
+
console.log(
|
|
10
|
+
chalk.cyan(`
|
|
11
|
+
사용방법:
|
|
12
|
+
npx tylerSong
|
|
13
|
+
|
|
14
|
+
옵션:
|
|
15
|
+
--help 도움말 표시
|
|
16
|
+
`)
|
|
17
|
+
);
|
|
18
|
+
process.exit(0);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// 사용자 질문
|
|
22
|
+
const answer = await inquirer.prompt([
|
|
23
|
+
{
|
|
24
|
+
type: "confirm",
|
|
25
|
+
name: "showInfo",
|
|
26
|
+
message: "저에 대해 궁금하신가요?",
|
|
27
|
+
default: true,
|
|
28
|
+
},
|
|
29
|
+
]);
|
|
30
|
+
|
|
31
|
+
if (answer.showInfo) {
|
|
32
|
+
console.log(
|
|
33
|
+
chalk.green(`
|
|
34
|
+
안녕하세요! 프론트엔드 개발자 송민성입니다.
|
|
35
|
+
|
|
36
|
+
Github: https://github.com/alstjd0051
|
|
37
|
+
E-mail: wsc7202@gmail.com
|
|
38
|
+
|
|
39
|
+
더 많은 정보는 --help를 통해 확인해주세요.
|
|
40
|
+
`)
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
main().catch(console.error);
|
package/package.json
ADDED