feat(create-mcfly): colorize commands

This commit is contained in:
Ayo 2023-10-23 16:13:27 +02:00
parent 95a471bf63
commit c26206ea21
3 changed files with 11 additions and 7 deletions

2
package-lock.json generated
View file

@ -3975,7 +3975,7 @@
}
},
"packages/create-mcfly": {
"version": "0.2.7",
"version": "0.2.8",
"license": "MIT",
"dependencies": {
"consola": "^3.2.3",

View file

@ -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) {
nextActions.push("Install the dependencies with: 'npm install'");
nextActions.push(
`Install the dependencies with ${colorize("yellow", "npm install")}`
);
}
nextActions = nextActions.concat([
"To start the dev server, run: 'npm start'",
"Join us at https://ayco.io/gh/McFly",
`Start the dev server with ${colorize("yellow", "npm start")}`,
`Join us at ${colorize("blue", "https://ayco.io/gh/McFly")}`,
]);
const result = `🎉 Your new ${colorize(
"bold",
"McFly"
)} app is now ready: ${directory}\n\nNext actions: ${nextActions
)} app is ready: ${directory}\n\nNext actions: ${nextActions
.map((action, index) => `\n${++index}. ${action}`)
.join("")}`;

View file

@ -1,6 +1,6 @@
{
"name": "create-mcfly",
"version": "0.2.7",
"version": "0.2.8",
"bin": {
"create-mcfly": "./index.js"
},