Skip to content

Commit c1fa620

Browse files
committed
use chalk module instead of ascii
1 parent 8036443 commit c1fa620

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

lib/index.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
'use strict'
33

44
const path = require('path')
5+
const chalk = require('chalk')
56
const program = require('commander')
67
const { version } = require('../package')
78

@@ -60,10 +61,10 @@ module.exports = async () => {
6061
Your module has been created at ${dest}.
6162
6263
To get started, in one tab, run:
63-
$ \x1B[36mcd ${params.shortName} && ${params.manager} start\x1B[39m
64+
$ ${chalk.cyan(`cd ${params.shortName} && ${params.manager} start`)}
6465
6566
And in another tab, run the create-react-app dev server:
66-
$ \x1B[36mcd ${path.join(params.shortName, 'example')} && ${params.manager} start\x1B[39m
67+
$ ${chalk.cyan(`cd ${path.join(params.shortName, 'example')} && ${params.manager} start`)}
6768
`)
6869

6970
return dest

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"publish"
3131
],
3232
"dependencies": {
33+
"chalk": "2.4.1",
3334
"commander": "^2.16.0",
3435
"conf": "^2.0.0",
3536
"cp-file": "^6.0.0",

yarn.lock

+8
Original file line numberDiff line numberDiff line change
@@ -996,6 +996,14 @@ center-align@^0.1.1:
996996
align-text "^0.1.3"
997997
lazy-cache "^1.0.3"
998998

999+
1000+
version "2.4.1"
1001+
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e"
1002+
dependencies:
1003+
ansi-styles "^3.2.1"
1004+
escape-string-regexp "^1.0.5"
1005+
supports-color "^5.3.0"
1006+
9991007
chalk@^0.4.0:
10001008
version "0.4.0"
10011009
resolved "https://registry.yarnpkg.com/chalk/-/chalk-0.4.0.tgz#5199a3ddcd0c1efe23bc08c1b027b06176e0c64f"

0 commit comments

Comments
 (0)