feat(create-mcfly): colorize commands
This commit is contained in:
parent
95a471bf63
commit
c26206ea21
3 changed files with 11 additions and 7 deletions
2
package-lock.json
generated
2
package-lock.json
generated
|
@ -3975,7 +3975,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"packages/create-mcfly": {
|
"packages/create-mcfly": {
|
||||||
"version": "0.2.7",
|
"version": "0.2.8",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"consola": "^3.2.3",
|
"consola": "^3.2.3",
|
||||||
|
|
|
@ -58,21 +58,25 @@ async function create() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let nextActions = [`Go to your project by running: 'cd ${directory}'`];
|
let nextActions = [
|
||||||
|
`Go to your project by running ${colorize("yellow", `cd ${directory}`)}`,
|
||||||
|
];
|
||||||
|
|
||||||
if (!installDeps) {
|
if (!installDeps) {
|
||||||
nextActions.push("Install the dependencies with: 'npm install'");
|
nextActions.push(
|
||||||
|
`Install the dependencies with ${colorize("yellow", "npm install")}`
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
nextActions = nextActions.concat([
|
nextActions = nextActions.concat([
|
||||||
"To start the dev server, run: 'npm start'",
|
`Start the dev server with ${colorize("yellow", "npm start")}`,
|
||||||
"Join us at https://ayco.io/gh/McFly",
|
`Join us at ${colorize("blue", "https://ayco.io/gh/McFly")}`,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const result = `🎉 Your new ${colorize(
|
const result = `🎉 Your new ${colorize(
|
||||||
"bold",
|
"bold",
|
||||||
"McFly"
|
"McFly"
|
||||||
)} app is now ready: ${directory}\n\nNext actions: ${nextActions
|
)} app is ready: ${directory}\n\nNext actions: ${nextActions
|
||||||
.map((action, index) => `\n${++index}. ${action}`)
|
.map((action, index) => `\n${++index}. ${action}`)
|
||||||
.join("")}`;
|
.join("")}`;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "create-mcfly",
|
"name": "create-mcfly",
|
||||||
"version": "0.2.7",
|
"version": "0.2.8",
|
||||||
"bin": {
|
"bin": {
|
||||||
"create-mcfly": "./index.js"
|
"create-mcfly": "./index.js"
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue