Skip to content

Commit acffb20

Browse files
author
ando
authored
Merge pull request #23 from iamando/develop
feature: use dedent for beautify output message on all set
2 parents 879fd65 + ef989bd commit acffb20

File tree

3 files changed

+26
-2
lines changed

3 files changed

+26
-2
lines changed

package-lock.json

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
"lint:fix": "prettier --write . && eslint --fix"
4444
},
4545
"devDependencies": {
46+
"@types/dedent": "^0.7.0",
4647
"@types/node": "^20.2.5",
4748
"@typescript-eslint/eslint-plugin": "^5.59.8",
4849
"@typescript-eslint/parser": "^5.59.8",
@@ -56,6 +57,7 @@
5657
"@clack/core": "^0.3.2",
5758
"@clack/prompts": "^0.6.3",
5859
"cleye": "^1.3.2",
60+
"dedent": "^0.7.0",
5961
"kolorist": "^1.8.0"
6062
}
6163
}

src/utils/commiter.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { promisify } from 'node:util'
22
import { exec } from 'node:child_process'
33
import { cancel, intro, group, confirm, outro } from '@clack/prompts'
44
import { lightYellow } from 'kolorist'
5+
import dedent from 'dedent'
56

67
import { CANCELED_OP_MSG } from './constants'
78
import { type, message } from './prompts'
@@ -52,7 +53,11 @@ export const commiter = async () => {
5253

5354
if (stderrCmd) throw new CliError(`An error occured: ${stderrCmd}`)
5455

55-
outro("You're all set!")
56+
outro(dedent`
57+
You're all set 🎉
58+
59+
use "git push" to publish your local commits
60+
`)
5661
}
5762

5863
return
@@ -62,7 +67,11 @@ export const commiter = async () => {
6267

6368
if (stderrCmd) throw new CliError(`An error occured: ${stderrCmd}`)
6469

65-
outro("You're all set!")
70+
outro(dedent`
71+
You're all set 🎉
72+
73+
use "git push" to publish your local commits
74+
`)
6675
} catch (err: any) {
6776
log({ type: 'error', msg: err.message })
6877
handleCliError(err)

0 commit comments

Comments
 (0)