tylersong 1.0.0 → 1.0.3
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/.github/workflows/npm-publish.yml +48 -0
- package/index.js +30 -14
- package/package.json +6 -3
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
name: Node.js Package
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
tags: ["v*"]
|
|
7
|
+
pull_request:
|
|
8
|
+
branches: [main]
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
build:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v3
|
|
15
|
+
|
|
16
|
+
- name: Setup Node.js
|
|
17
|
+
uses: actions/setup-node@v3
|
|
18
|
+
with:
|
|
19
|
+
node-version: "18.x"
|
|
20
|
+
registry-url: "https://registry.npmjs.org/"
|
|
21
|
+
|
|
22
|
+
- name: Install dependencies
|
|
23
|
+
run: npm ci || npm install
|
|
24
|
+
|
|
25
|
+
- name: Run tests
|
|
26
|
+
run: npm test || true
|
|
27
|
+
|
|
28
|
+
publish:
|
|
29
|
+
needs: build
|
|
30
|
+
runs-on: ubuntu-latest
|
|
31
|
+
if: startsWith(github.ref, 'refs/tags/v')
|
|
32
|
+
|
|
33
|
+
steps:
|
|
34
|
+
- uses: actions/checkout@v3
|
|
35
|
+
|
|
36
|
+
- name: Setup Node.js
|
|
37
|
+
uses: actions/setup-node@v3
|
|
38
|
+
with:
|
|
39
|
+
node-version: "18.x"
|
|
40
|
+
registry-url: "https://registry.npmjs.org/"
|
|
41
|
+
|
|
42
|
+
- name: Install dependencies
|
|
43
|
+
run: npm ci || npm install
|
|
44
|
+
|
|
45
|
+
- name: Publish to npm
|
|
46
|
+
run: npm publish
|
|
47
|
+
env:
|
|
48
|
+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
package/index.js
CHANGED
|
@@ -7,12 +7,15 @@ const main = async () => {
|
|
|
7
7
|
// 도움말 옵션 체크
|
|
8
8
|
if (process.argv.includes("--help")) {
|
|
9
9
|
console.log(
|
|
10
|
-
chalk.
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
chalk.yellow(`
|
|
11
|
+
╭───────────────────────────────╮
|
|
12
|
+
│ 사용 방법 │
|
|
13
|
+
├───────────────────────────────┤
|
|
14
|
+
│ npx tylerSong │
|
|
15
|
+
│ │
|
|
16
|
+
│ 옵션: │
|
|
17
|
+
│ --help 도움말 표시 │
|
|
18
|
+
╰───────────────────────────────╯
|
|
16
19
|
`)
|
|
17
20
|
);
|
|
18
21
|
process.exit(0);
|
|
@@ -23,21 +26,34 @@ const main = async () => {
|
|
|
23
26
|
{
|
|
24
27
|
type: "confirm",
|
|
25
28
|
name: "showInfo",
|
|
26
|
-
message: "저에 대해 궁금하신가요?",
|
|
29
|
+
message: chalk.cyan("✨ 저에 대해 궁금하신가요?"),
|
|
27
30
|
default: true,
|
|
28
31
|
},
|
|
29
32
|
]);
|
|
30
33
|
|
|
31
34
|
if (answer.showInfo) {
|
|
32
35
|
console.log(
|
|
33
|
-
chalk.
|
|
34
|
-
|
|
36
|
+
chalk.bold.cyan(`
|
|
37
|
+
╭───────────────────────────────────────────╮
|
|
38
|
+
│ 🚀 Frontend Developer Profile 🚀 │
|
|
39
|
+
╰───────────────────────────────────────────╯
|
|
40
|
+
|
|
41
|
+
`) +
|
|
42
|
+
chalk.green(`👋 안녕하세요!
|
|
43
|
+
💻 프론트엔드 개발자 ${chalk.bold.yellow("송민성")}입니다.
|
|
35
44
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
45
|
+
`) +
|
|
46
|
+
chalk.hex("#fef6e1")(`📌 Github: ${chalk.underline.whiteBright(
|
|
47
|
+
`https://github.com/alstjd0051`
|
|
48
|
+
)}
|
|
49
|
+
`) +
|
|
50
|
+
chalk.blue(`✉️ E-mail: ${chalk.underline.whiteBright(
|
|
51
|
+
`wsc7202@gmail.com`
|
|
52
|
+
)}
|
|
53
|
+
`) +
|
|
54
|
+
chalk.magenta(`
|
|
55
|
+
💡 더 많은 정보는 ${chalk.bold("--help")}를 통해 확인해주세요.
|
|
56
|
+
`)
|
|
41
57
|
);
|
|
42
58
|
}
|
|
43
59
|
};
|
package/package.json
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tylersong",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "나의 CLI 자기소개 도구",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
7
|
-
"tylersong": "
|
|
7
|
+
"tylersong": "index.js"
|
|
8
8
|
},
|
|
9
9
|
"type": "module",
|
|
10
10
|
"keywords": [
|
|
11
11
|
"cli"
|
|
12
12
|
],
|
|
13
13
|
"author": "송민성",
|
|
14
|
-
"license": "MIT"
|
|
14
|
+
"license": "MIT",
|
|
15
|
+
"scripts": {
|
|
16
|
+
"test": "echo \"No test specified\""
|
|
17
|
+
}
|
|
15
18
|
}
|